Merge branch 'main' of ssh://code.event-federation.eu:2222/Event-Federation/documentation

This commit is contained in:
André Menrath 2023-11-22 18:27:27 +01:00
commit dd5bd728c5
2 changed files with 21 additions and 21 deletions

View file

@ -41,4 +41,8 @@ This document describes what Event object implementations of existing services l
+ },
+ }
]
}```
}
```
The schema stuff got merged right ahead:
https://framagit.org/les/gancio/-/commit/9e1c2c2371e50dd1dbda32b92d5c45e4c0eb0900

View file

@ -26,12 +26,11 @@ The following terms are used:
## Actor related
- **actors:** ActivityPub [Actor Objects](https://www.w3.org/TR/activitypub/#actor-objects)
- **actor types:** ActivityPub [Actor Types](https://www.w3.org/TR/activitystreams-vocabulary/#actor-types)
- **WordPress actor types:** Things on WordPress that can be mapped to actors:
- **WordPress actor types:** Things on WordPress that can be mapped to actors, e.g.:
- WordPress users →`Person`
- Whole Blog →`Application` or `Group`
- post types → e.g., `Organization`
- custom definitions → custom actor types
- **mapping:** Which WordPress actor types are mapped to any ActivityPub actors at all and to which ones.
- Post types → e.g., `Organization`
- **Actor mapper:** Describes the mapping of WordPress actor types to any ActivityPub actors.
## General
- **publish/dispatch:** Sending a `Create`, `Update` or `Announce` [Activity](https://www.w3.org/TR/activitypub/#create-activity-outbox).
@ -117,7 +116,7 @@ All publicly accessible WordPress post types can become active for ActivityPub f
| **page** | O | O | - | - |
| **tribe_events** | O | - | X | O |
| **custom_event** | O | - | - | O |
| **…** | O | - | - | - |
| **…** | O | - | - | - |
**columns:** Available transformers
**rows:** Public and non-password protected WordPress post types
@ -148,7 +147,7 @@ Use WordPress's hook system or a public API function to let other plugins regist
- The ActivityPub plugin could provide reusable Traits for common tasks.
- Provide useful functions, documentation, and examples for automatic testing of transformers.
- Highly unlikely: The ActivityPub plugin provides an even more height level framework for adding transformers. For example for events the ActivityPub plugin could provide a built-in transformer to the object type `Event` which only needs a mapping (might make things harder, instead of making them easier). See Appendix.
- Highly unlikely: The ActivityPub plugin provides an even more high level framework for adding transformers. For example for events the ActivityPub plugin could provide a built-in transformer to the object type `Event` which only needs a mapping (might make things harder, instead of making them easier). See Appendix.
- Highly unlikely: don't use an interface with implementations, (miss)use class extensions.
@ -194,28 +193,25 @@ Other WordPress actor types might have valid use cases, like actors for categori
- Who is the `actor`, who is the `attributedTo`, who is just sending an `Announce` of a post?
## Proposed starting point for evaluating use cases
We keep in mind that every post type shall only ever send as a `Create` Activity once by one single actor.
We keep in mind that every post shall only ever be sent as a `Create` Activity once, by one single actor.
Therefore when the ActivityPub plugin makes use of a certain WordPress actor type, the WordPress actor type must exactly return one actor, which may depend on the current post being published and on the user doing the action (latter information should also be available within the WP_Post object).
**User Interface:**
| | users | tribe_organizers | custom | blog | category |
| -----------------|:-----:|:----------------:|:------:|:-----:|:--------:|
| **post** | C | O | O | A | A |
| **page** | C | O | O | A | O |
| **tribe_events** | O | C | - | A | 0 |
| **product** | O | - | C | 0 | 0 |
| | User | Event organizers | Product Relay | Relay(Blog) | Categories |
| -----------------|:-----:|:----------------:|:-------------:|:------------:|:----------:|
| **post** | C | - | - | A | A |
| **page** | C | - | - | A | O |
| **tribe_events** | O | C | - | A | 0 |
| **product** | O | - | C | 0 | 0 |
**x:** WordPress actor-types
**x:** Actor mapper
**y:** WordPress post types
**C:** `Create` — can only be assigned once per row
**A:** `Announce` — can be assigned multiple times per row, but only if a `Create` has been assigned before
**user:** the WordPress user publishing or updating something
**all:** blog-wide actor, everything that is published (like a relay)
**custom:** e.g. only a certain post type that gets announced with this actor
**tribe_organizers:** only posts by one organizer
**A:** `Announce` — can be assigned multiple times per row, but only if a `Create` has been assigned before
- Only allow setting something to `Announce`, when a `Create` is already set.
- Maybe forbid, that a user can automatically announce a post, because it's the "lowest level".
- Maybe forbid, that a user can automatically announce a post, because it's the "lowest level".
## Actor collisions
Each ActivityPub actor must have a [unique ID](https://www.w3.org/TR/activitypub/#obj-id). In our case this is an HTTPS URI.