diff --git a/event_import.md b/event_import.md index 52798ea..150dabd 100644 --- a/event_import.md +++ b/event_import.md @@ -19,12 +19,13 @@ It neglets all event related fields but `title`, `summary` and `url` which it us ### Required -- [`name`](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-name): The events title. - [`attributedTo`](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-attributedTo) or [`actor`](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-actor): Mobilizon uses actor for the user profile and attributedTo for the group. But as `actor` being part of an object is not part of the ActivityPub spec, solely using `attributedTo` might preferred if they are similar. - `id`: This is also used for the `url`. +- [`name`](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-name): The events title. ### Optional +- [`attachment`](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-attachment) How they are used - [`anonymousparticipationenabled`](https://docs.joinmobilizon.org/contribute/activity_pub/#anonymousparticipationenabled) - `category`: default list of categories can be found [in the source code](https://framagit.org/framasoft/mobilizon/-/blob/main/lib/mobilizon/events/categories.ex?ref_type=heads#L28), but it can be extended via environment variables. Note that the source code shows them in lowercase, but they have to be passed as uppercase, e.g. `MOVEMENTS_POLITICS`. - [`commentsEnabled`](https://docs.joinpeertube.org/api/activitypub) @@ -46,27 +47,6 @@ It neglets all event related fields but `title`, `summary` and `url` which it us - `timezone` - `url`: [Documentation](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-url) - Note: `url` was added to the list as it was referenced in the text but not explicitly listed in the initial set. - -- [`content`](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-content): `contentMap` is currently not supported by Mobilizon. -- [`location`](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-location): The subkey [`address`](https://schema.org/address) is accepted, both as [`PostalAddress`](https://schema.org/PostalAddress) and pure text. -- [`mentions`](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-mentions) -- [`tag`](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-tag) -- [`maximumAttendeeCapacity`](https://docs.joinmobilizon.org/contribute/activity_pub/#maximumattendeecapacity) -- [`anonymousparticipationenabled`](https://docs.joinmobilizon.org/contribute/activity_pub/#anonymousparticipationenabled) - - `remainingAttendeeCapacity`: [Not parsed at the moment](https://framagit.org/framasoft/mobilizon/-/issues/1412) - - `participantCount`: [Not parsed at the moment](https://framagit.org/framasoft/mobilizon/-/issues/1412) -- `is_online` boolean whether the Event is online. -- `timezone`: e.g., `Europe/Vienna`. Not documented yet, see the handling below. -- `metadata`: This is a list which can contain items. TODO. -- `contacts`: a list of contacts: each item might be just the `id`/`url` or an `Actor` object. -- `category`: default list of categories can be found [in the source code](https://framagit.org/framasoft/mobilizon/-/blob/main/lib/mobilizon/events/categories.ex?ref_type=heads#L28), but it can be extended via environment variables. Note that the source code shows them in lowercase, but they have to be passed as uppercase, e.g. `MOVEMENTS_POLITICS`. -- [`repliesModerationOption`](https://docs.joinmobilizon.org/contribute/activity_pub/#repliesModerationOption) -- [`commentsEnabled`](https://docs.joinpeertube.org/api/activitypub) -- [`joinMode`](https://docs.joinmobilizon.org/contribute/activity_pub/#joinmode): `[free, restricted, invite, external]` default is `free`. -- `externalParticipationUrl`: only used if `joinMode` is set to `external`. -- [`startTime`](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-startTime) -- [`endTime`](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-endTime) - ### Not used - [`url`](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-url): internally Mobilizon uses the `id` as URL. @@ -82,7 +62,7 @@ It neglets all event related fields but `title`, `summary` and `url` which it us - If `timezone` is not defined Mobilizon might calculate the timezone via the `location`. -### Banner image +### Attachment/Banner-image handling Mobilizon currently expects all images to by within `attachment` and to be an `Object` of type `Document`. It first looks for an object where the `name` is equal to `Banner`. If that is not found it uses ´attachment[0]`. @@ -92,18 +72,22 @@ Mobilizon currently expects all images to by within `attachment` and to be an `O ### Required +- `id`: even though Gancio currently does not [list it as required in its source code](https://framagit.org/les/gancio/-/blob/master/server/federation/events.js?ref_type=heads#L19), there will be an error without out it. - [`name`](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-name): The events title. - [`startTime`](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-startTime) -- `id`: though Gancio currently does not [list it as required in its source code](https://framagit.org/les/gancio/-/blob/master/server/federation/events.js?ref_type=heads#L19), there will be an error without out it. ### Optional -- [`location`](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-location): The subkey [`address`](https://schema.org/address) is accepted, both as [`PostalAddress`](https://schema.org/PostalAddress) and pure text. For `PostalAddress` only `streetAddress`, `addressLocality`, and `addressCountry` are used. - [`attachment`](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-attachment) Only the first one is used as a banner image, all others are ignored, see below. -- [`endTime`](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-endTime) - [`content`](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-content) `contentMap` is currently not supported by Gancio. +- [`endTime`](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-endTime) +- [`location`](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-location): The subkey [`address`](https://schema.org/address) is accepted, both as [`PostalAddress`](https://schema.org/PostalAddress) and pure text. For `PostalAddress` only `streetAddress`, `addressLocality`, and `addressCountry` are used. - [`summary`](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-summary) The summary is only used when no content is supplied. +### Not used + +- `attributedTo`/`actor`: Gancio does not support fetching event other than by receiving a `Create` or `Update` activity (TODO: what about `Announce`), the actor is always just fetched from the activity, not the object within. + ### Handling of visibility Currently Gancio does not seem to handle any visibility or replies-policy options. It sets all remote events it received to the internal `is_visible` to `true`.