Add ActivityPub Person follow from distant (#8720)

This PR is part of #4767. It

1. adds the ability to follow a local person from a distant federation server (see tests/integration/api_activitypub_person_inbox_follow_test.go)
2. streamlines the router code (refactor the person conversion & handling of inbox requests in service direction, unifies service call signature & error handling)
3. introduces queues for decoupling outgoing communication (delivery retry to cope network issues or distant service downtimes) and
4. adds minor fixes to integration tests (test timeout & invalid inbox activities)

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/8720
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Michael Jerger <michael.jerger@meissa-gmbh.de>
Co-committed-by: Michael Jerger <michael.jerger@meissa-gmbh.de>
This commit is contained in:
Michael Jerger 2025-08-03 11:55:01 +02:00 committed by Earl Warren
parent 64193310ee
commit 7566ebfba7
13 changed files with 422 additions and 66 deletions

View file

@ -38,6 +38,7 @@ import (
"forgejo.org/services/auth/source/oauth2"
"forgejo.org/services/automerge"
"forgejo.org/services/cron"
federation_service "forgejo.org/services/federation"
feed_service "forgejo.org/services/feed"
indexer_service "forgejo.org/services/indexer"
"forgejo.org/services/mailer"
@ -122,6 +123,7 @@ func InitWebInstalled(ctx context.Context) {
mailer.NewContext(ctx)
mustInit(cache.Init)
mustInit(feed_service.Init)
mustInit(federation_service.Init)
mustInit(uinotification.Init)
mustInitCtx(ctx, archiver.Init)