architecture proposal: actor mapping: give mappers more duties
This commit is contained in:
parent
fb56d094f0
commit
ee751a04ee
1 changed files with 15 additions and 19 deletions
|
@ -26,12 +26,11 @@ The following terms are used:
|
||||||
## Actor related
|
## Actor related
|
||||||
- **actors:** ActivityPub [Actor Objects](https://www.w3.org/TR/activitypub/#actor-objects)
|
- **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)
|
- **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`
|
- WordPress users →`Person`
|
||||||
- Whole Blog →`Application` or `Group`
|
- Whole Blog →`Application` or `Group`
|
||||||
- post types → e.g., `Organization`
|
- Post types → e.g., `Organization`
|
||||||
- custom definitions → custom actor types
|
- **Actor mapper:** Describes the mapping of WordPress actor types to any ActivityPub actors.
|
||||||
- **mapping:** Which WordPress actor types are mapped to any ActivityPub actors at all and to which ones.
|
|
||||||
|
|
||||||
## General
|
## General
|
||||||
- **publish/dispatch:** Sending a `Create`, `Update` or `Announce` [Activity](https://www.w3.org/TR/activitypub/#create-activity-outbox).
|
- **publish/dispatch:** Sending a `Create`, `Update` or `Announce` [Activity](https://www.w3.org/TR/activitypub/#create-activity-outbox).
|
||||||
|
@ -194,25 +193,22 @@ 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?
|
- Who is the `actor`, who is the `attributedTo`, who is just sending an `Announce` of a post?
|
||||||
|
|
||||||
## Proposed starting point for evaluating use cases
|
## 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:**
|
**User Interface:**
|
||||||
|
|
||||||
| | users | tribe_organizers | custom | blog | category |
|
| | User | Event organizers | Product Relay | Relay(Blog) | Categories |
|
||||||
| -----------------|:-----:|:----------------:|:------:|:-----:|:--------:|
|
| -----------------|:-----:|:----------------:|:-------------:|:------------:|:----------:|
|
||||||
| **post** | C | O | O | A | A |
|
| **post** | C | - | - | A | A |
|
||||||
| **page** | C | O | O | A | O |
|
| **page** | C | - | - | A | O |
|
||||||
| **tribe_events** | O | C | - | A | 0 |
|
| **tribe_events** | O | C | - | A | 0 |
|
||||||
| **product** | O | - | C | 0 | 0 |
|
| **product** | O | - | C | 0 | 0 |
|
||||||
|
|
||||||
**x:** WordPress actor-types
|
**x:** Actor mapper
|
||||||
**y:** WordPress post types
|
**y:** WordPress post types
|
||||||
**C:** `Create` — can only be assigned once per row
|
**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
|
**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
|
|
||||||
|
|
||||||
- Only allow setting something to `Announce`, when a `Create` is already set.
|
- 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".
|
||||||
|
|
Loading…
Reference in a new issue