mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-16 03:05:09 +00:00
1.9 KiB
1.9 KiB
# edn notation
{@context [
"as": "https://www.w3.org/ns/activitystreams#",
"forge": "https://forgefed.org/ns#",],
::as/id "https://repo.prod.meissa.de/api/v1/activitypub/user-id/1/outbox/12345",
::as/type "Star",
::forge/source "forgejo",
::as/actor "https://repo.prod.meissa.de/api/v1/activitypub/user-id/1",
::as/object "https://codeberg.org/api/v1/activitypub/repository-id/12"
}
# json notation
{"id": "https://repo.prod.meissa.de/api/v1/activitypub/user-id/1/outbox/12345",
"type": "Star",
"source": "forgejo",
"actor": "https://repo.prod.meissa.de/api/v1/activitypub/user-id/1",
"object": "https://codeberg.org/api/v1/activitypub/repository-id/1"
}
This way of expressing stars will have the following features:
- Actor & object may be dereferenced by (ap-)api
- The activity can be referenced itself (e.g. in order to express a result of the triggered action)
- Star is a special case of a Like. Star only happens in ForgeFed context. Different things should be named differnt ...
- With the
source
given it would be more easy to distinguish the uri layout for object and actor id's and make implementation more straight forward- The
source
field reflects the software sending an activity. Values of may be forgejo, gitlab, ... - Knowing the sending system will it make easier to interact with:
- We know exactly how the actor can be derefernced (see:
7cac9806f8/models/forgefed/actor.go (L121)
) - We know how we can validate the given references (see:
7cac9806f8/routers/api/v1/activitypub/repository.go (L180)
)
- We know exactly how the actor can be derefernced (see:
- The
See also: