diff --git a/FEDERATION.md b/FEDERATION.md index 6aa2cbfb13..86e74892a6 100644 --- a/FEDERATION.md +++ b/FEDERATION.md @@ -2,9 +2,9 @@ *This describes Gitea's future federation capabilities, not what it can do currently.* -Gitea is federated using [ActivityPub](https://www.w3.org/TR/activitypub/) and the [ForgeFed extension](https://forgefed.org/) so you can interact with users and repositories from other instances as if they were on your own instance. By using the standardized ActivityPub protocol, users on any fediverse software such as [Mastodon](https://joinmastodon.org/) can follow Gitea users, star repos, receive activity updates, and comment on issues. +Gitea is federated using [ActivityPub](https://www.w3.org/TR/activitypub/) and the [ForgeFed extension](https://forgefed.org/) so you can interact with users and repositories from other instances as if they were on your own instance. By using the standardized ActivityPub protocol, users on any fediverse software such as [Mastodon](https://joinmastodon.org/) can follow Gitea users, star repositories, receive activity updates, and comment on issues. -Currently, C2S ActivityPub is not supported. +C2S ActivityPub is not supported because Gitea already has an existing API. ## Following diff --git a/routers/api/v1/activitypub/ticket.go b/routers/api/v1/activitypub/ticket.go index 9a064673d4..09da07e2e2 100644 --- a/routers/api/v1/activitypub/ticket.go +++ b/routers/api/v1/activitypub/ticket.go @@ -68,7 +68,7 @@ func Ticket(ctx *context.APIContext) { ticket.Name = ap.NaturalLanguageValuesNew() // Setting a NaturalLanguageValue to a number causes go-ap's JSON parsing to do weird things // Workaround: set it to #1 instead of 1 - err = ticket.Name.Set("en", ap.Content("#" + ctx.Params("id"))) + err = ticket.Name.Set("en", ap.Content("#"+ctx.Params("id"))) if err != nil { ctx.ServerError("Set Name", err) return diff --git a/routers/web/authorize_interaction.go b/routers/web/authorize_interaction.go index 471d4bf378..45c257e623 100644 --- a/routers/web/authorize_interaction.go +++ b/routers/web/authorize_interaction.go @@ -28,7 +28,7 @@ func AuthorizeInteraction(ctx *context.Context) { ctx.ServerError("Fetch", err) return } - + ap.ItemTyperFunc = forgefed.GetItemByType ap.JSONItemUnmarshal = forgefed.JSONUnmarshalerFn ap.NotEmptyChecker = forgefed.NotEmpty @@ -37,7 +37,7 @@ func AuthorizeInteraction(ctx *context.Context) { ctx.ServerError("UnmarshalJSON", err) return } - + switch object.GetType() { case ap.PersonType: // Federated user