Signed-off-by: Thomas Citharel <tcit@tcit.fr>
3.1 KiB
Federation
ActivityPub
Mobilizon uses ActivityPub to federate content between instances. It only supports the server-to-server part of the ActivityPub spec.
It implements the HTTP signatures spec for authentication of inbox deliveries, but doesn't implement Linked Data Signatures for forwarded payloads, and instead fetches content when needed.
To match usernames to actors, Mobilizon uses WebFinger.
Instance subscriptions
Instances subscribe to each other through an internal actor named relay@instance.tld
that publishes (through Announce
) every created content to it's followers. Each content creation share is saved so that updates and deletes are correctly sent to every
Activities
Supported Activity | Supported Object |
---|---|
Accept |
Follow , Join |
Announce |
Object |
Create |
Note , Event |
Delete |
Object |
Flag |
Object |
Follow |
Object |
Reject |
Follow , Join |
Remove |
Note , Event |
Undo |
Announce , Follow |
Update |
Object |
Extensions
Event
The vocabulary for Event is based on the Event object in ActivityStreams, extended with :
- the Event Schema from Schema.org
- some properties from iCalendar, such as
ical:status
(see this issue)
The following properties are added.
repliesModeration
Disabling replies is an ongoing issue with ActivityPub so we use a temporary property.
Accepted values: allow_all
, closed
, moderated
(not used at the moment)
Example:
{
"@context": [
"...",
{
"mz": "https://joinmobilizon.org/ns#",
"repliesModerationOption": {
"@id": "mz:repliesModerationOption",
"@type": "mz:repliesModerationOptionType"
},
"repliesModerationOptionType": {
"@id": "mz:repliesModerationOptionType",
"@type": "rdfs:Class"
}
}
],
"...": "...",
"repliesModerationOption": "allow_all",
"type": "Event",
"url": "http://mobilizon1.com/events/8cf76e9f-c426-4912-9cd6-c7030b969611"
}
joinMode
Indicator of how new members may be able to join.
Accepted values: free
, restricted
, invite
(not used at the moment)
Example:
{
"@context": [
"...",
{
"mz": "https://joinmobilizon.org/ns#",
"joinMode": {
"@id": "mz:joinMode",
"@type": "mz:joinModeType"
},
"joinModeType": {
"@id": "mz:joinModeType",
"@type": "rdfs:Class"
}
}
],
"...": "...",
"joinMode": "restricted",
"type": "Event",
"url": "http://mobilizon1.com/events/8cf76e9f-c426-4912-9cd6-c7030b969611"
}