1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-01 09:51:39 -05:00
forgejo/docs/unsure-where-to-put/adr_star_activity.md

32 lines
1.3 KiB
Markdown
Raw Normal View History

2023-10-20 10:12:37 -04:00
```
2023-11-10 08:10:23 -05:00
# edn notation
2023-10-20 10:12:37 -04:00
{@context [
"as": "https://www.w3.org/ns/activitystreams#",
"forge": "https://forgefed.org/ns#",],
2023-11-29 03:21:54 -05:00
::as/id "https://repo.prod.meissa.de/api/v1/activitypub/user-id/1/outbox/12345",
2023-10-20 10:12:37 -04:00
::as/type "Star",
::forge/source "forgejo",
2023-11-29 03:21:54 -05:00
::as/actor "https://repo.prod.meissa.de/api/v1/activitypub/user-id/1",
::as/object "https://codeberg.org/api/v1/activitypub/repository-id/12"
2023-10-20 10:12:37 -04:00
}
2023-11-10 08:10:23 -05:00
# json notation
2023-11-15 06:28:26 -05:00
{"id": "https://repo.prod.meissa.de/api/v1/activitypub/user-id/1/outbox/12345",
2023-11-10 08:10:23 -05:00
"type": "Star",
"source": "forgejo",
2023-11-15 06:28:26 -05:00
"actor": "https://repo.prod.meissa.de/api/v1/activitypub/user-id/1",
"object": "https://codeberg.org/api/v1/activitypub/repository-id/1"
2023-11-10 08:10:23 -05:00
}
2023-10-20 10:12:37 -04:00
```
This way of expressing stars will have the following features:
1. !ctor & object may be dereferenced by (ap-)api
2. The activity can be referenced itself (e.g. in order to express a result of the triggered action)
3. Star is a special case of a Like. Star only happens in ForgeFed context. Different things should be named differnt ...
4. 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
See also:
1. spec in clojure: https://repo.prod.meissa.de/meissa/activity-pub-poc/src/branch/forgefed_star/src/test/cljc/org/domaindrivenarchitecture/fed_poc/forgefed_test.cljc#L36-L41