-
-
Notifications
You must be signed in to change notification settings - Fork 85
Add LitePub relay implementation #471
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report❌ Patch coverage is
... and 2 files with indirect coverage changes 🚀 New features to boost your workflow:
|
|
@sij411 Could you rebase your commits on the latest next branch? |
dahlia
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like there's quite a bit of duplicate code between MastodonRelay and LitePubRelay. How about we create an abstract base class, let's call it BaseRelay for now, move the shared code into it, and then have MastodonRelay and LitePubRelay inherit from BaseRelay?
|
The docs for this pull request have been published: |
That was my original plan, yes it is supposed be like that eventually. Do you think that should be done in this PR? |
|
@sij411 Fair enough. Please refactor it in the next PR! |
|
By the way, |
I'll let you know test result when it's done. maybe in few days. |
|
As you know, we tested LitePub relay and checked 1) the relay server can be subscribed by two Akkoma instances (deployed with DigitalOcean Droplet), 2) the posts of relay subscribers are showed up on "Known Hosts" tab for each instance. I think we could wrap up the LitePub relay protocol implementations, and refactor module structures and etc in another PR. |
|
The latest push to this pull request has been published to JSR and npm as a pre-release:
|
Summary
This PR adds a LitePub-compatible ActivityPub relay implementation to the
@fedify/relaypackage, complementing the existing Mastodon relay implementation.Related Issue
#359
Changes
the LitePub relay protocol
activities before forwarding
packages/relay/src/relay.test.ts:455-832 covering:
Benefits
LitePub-compatible fediverse software, which expects activities to be wrapped in
Announce rather than directly forwarded
better visibility across the fediverse
(MastodonRelay) and LitePub-style (LitePubRelay) relay implementations based on
their target ecosystem
it easy to switch between protocols
Checklist
Additional Notes
Key differences between LitePub and Mastodon relay protocols:
- LitePub wraps activities in Announce objects with relay as actor
- Mastodon forwards activities directly using ctx.forwardActivity()
The implementation follows the same subscription management and key pair handling
as MastodonRelay, ensuring consistent behavior for core relay functionality like
follower management and subscription approvals.