-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
WIP: Federated following #19981
Closed
Closed
WIP: Federated following #19981
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
go get github.com/go-fed/activity/streams@master go get github.com/go-fed/activity/pub@master go get github.com/go-fed/httpsig@master
Return informations regarding a Person (as defined in ActivityStreams https://www.w3.org/TR/activitystreams-vocabulary/#dfn-person). Refs: #14186 Signed-off-by: Loïc Dachary <loic@dachary.org>
Refs: #14186 Signed-off-by: Loïc Dachary <loic@dachary.org>
Signed-off-by: Loïc Dachary <loic@dachary.org>
Signed-off-by: Loïc Dachary <loic@dachary.org>
Signed-off-by: Loïc Dachary <loic@dachary.org>
Signed-off-by: Loïc Dachary <loic@dachary.org>
Signed-off-by: Anthony Wang <ta180m@pm.me>
Signed-off-by: Anthony Wang <ta180m@pm.me>
Signed-off-by: Anthony Wang <ta180m@pm.me>
Signed-off-by: Anthony Wang <ta180m@pm.me>
Signed-off-by: Anthony Wang <ta180m@pm.me>
Signed-off-by: Anthony Wang <ta180m@pm.me>
Signed-off-by: Anthony Wang <ta180m@pm.me>
Signed-off-by: Anthony Wang <ta180m@pm.me>
Signed-off-by: Anthony Wang <ta180m@pm.me>
Current code review is happening at: https://gitea.com/Ta180m/gitea/pulls/6 |
I'm closing this pull request since I need to rebase the changes onto the Gitea main branch. I'll submit a new PR tomorrow. |
(And that is not possible here, with an git push --force-with-lease ) |
This pull request was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
lgtm/need 2
This PR needs two approvals by maintainers to be considered for merging.
pr/wip
This PR is not ready for review
status/blocked
This PR cannot be merged yet, i.e. because it depends on another unmerged PR
topic/federation
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request implements ActivityPub-federated following so users on a Gitea instance can follow users on any other ActivityPub server (Gitea, Mastodon, PeerTube, Pleroma, etc) and vice versa.
Since #19133 hasn't been merged yet, this PR is currently meant for discussing high-level changes like remote users instead of reviewing the code. (If you want to view the code changes, I made a PR on my personal Gitea repository with that)
Why federated following?
Federated following seems like an odd choice for the first federated behavior for Gitea, but it is actually a good place to start:
Inboxes and outboxes
The first commit implements basic inbox and outbox handling. Since we are not implementing C2S ActivityPub for Gitea, the inbox is not persisted to the database and the outbox reuses the Action table for database storage.
Currently,
go-ap
does not yet support any of the ForgeFed activity types. As a result, this PR does not implement any type-specific processing (so it currently just returns an empty outbox).In the future, we will add more
ActionType
s for the various AP activity types that we wish to support.Additional information: #5
Remote users
This PR currently stores remote users in the database using the new LoginType
Federated
, and stores the fullusername@instance.com
as the username and the ActivityPub IRI as the user's website (which is very hacky and needs to be changed). When viewing a remote user's profile in the web UI, you are redirected to their instance.Additional information: #2
UI
Currently, this PR only adds the backend code for federated following, so there is no UI (yet) for federated following. From the end user's perspective, that means they will at the moment only be able to follow Gitea accounts using non-Gitea AP software like Mastodon, since there is no UI to follow an AP account remotely from a Gitea instance.
TODO
Fix lint errors
Write integration tests
Implement a federated following UI
Depends on User keypairs and HTTP signatures for ActivityPub federation using go-ap #19133