fix: add stub outboxes to actors (#10120)

Mastodon doesn't create actors locally if the outbox is not found.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/10120
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: famfo <famfo@famfo.xyz>
Co-committed-by: famfo <famfo@famfo.xyz>
This commit is contained in:
famfo
2025-12-01 16:51:35 +01:00
committed by Gusted
parent 3f207017a8
commit b428d47aaa
9 changed files with 178 additions and 37 deletions
+2
View File
@@ -892,6 +892,7 @@ func Routes() *web.Route {
m.Group("/actor", func() {
m.Get("", activitypub.Actor)
m.Post("/inbox", activitypub.ReqHTTPUserOrInstanceSignature(), activitypub.ActorInbox)
m.Get("/outbox", activitypub.ActorOutbox)
})
m.Group("/repository-id/{repository-id}", func() {
m.Get("", activitypub.ReqHTTPUserSignature(), activitypub.Repository)
@@ -899,6 +900,7 @@ func Routes() *web.Route {
bind(ap.Activity{}),
activitypub.ReqHTTPUserSignature(),
activitypub.RepositoryInbox)
m.Get("/outbox", activitypub.ReqHTTPUserSignature(), activitypub.RepositoryOutbox)
}, context.RepositoryIDAssignmentAPI())
}, tokenRequiresScopes(auth_model.AccessTokenScopeCategoryActivityPub))
}