From 9bec7732cf8a6ca0180bb970b96962ae539c4034 Mon Sep 17 00:00:00 2001 From: Michael Jerger Date: Fri, 10 Nov 2023 14:10:23 +0100 Subject: [PATCH] prepare next steps --- docs/unsure-where-to-put/adr_star_activity.md | 9 +++++++++ routers/api/v1/activitypub/repository.go | 2 ++ 2 files changed, 11 insertions(+) diff --git a/docs/unsure-where-to-put/adr_star_activity.md b/docs/unsure-where-to-put/adr_star_activity.md index c17fb04393..4ed9a8fe9f 100644 --- a/docs/unsure-where-to-put/adr_star_activity.md +++ b/docs/unsure-where-to-put/adr_star_activity.md @@ -1,4 +1,5 @@ ``` +# edn notation {@context [ "as": "https://www.w3.org/ns/activitystreams#", "forge": "https://forgefed.org/ns#",], @@ -8,6 +9,14 @@ ::as/actor "https://repo.prod.meissa.de/api/activitypub/user-id/1", ::as/object "https://codeberg.org/api/activitypub/repository-id/12" } + +# json notation +{"id": "https://repo.prod.meissa.de/api/activitypub/user-id/1/outbox/12345", + "type": "Star", + "source": "forgejo", + "actor": "https://repo.prod.meissa.de/api/activitypub/user-id/1", + "object": "https://codeberg.org/api/activitypub/repository-id/1" +} ``` This way of expressing stars will have the following features: diff --git a/routers/api/v1/activitypub/repository.go b/routers/api/v1/activitypub/repository.go index 1279c2f3be..1bb90ec690 100644 --- a/routers/api/v1/activitypub/repository.go +++ b/routers/api/v1/activitypub/repository.go @@ -71,5 +71,7 @@ func RepositoryInbox(ctx *context.APIContext) { log.Info("RepositoryInbox: repo %v, %v", ctx.Repo.Repository.OwnerName, ctx.Repo.Repository.Name) log.Info("RepositoryInbox: doer %v, %v", ctx.Doer.Name, ctx.Doer.ID) + // assume actor is: "actor": "https://codeberg.org/api/activitypub/user-id/12345" + ctx.Status(http.StatusNoContent) }