From fb56d094f0b38d2e50fc8973ba21f207bff532f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Menrath?= Date: Fri, 13 Oct 2023 17:36:40 +0200 Subject: [PATCH 1/4] architecture proposal: fix typo --- architecture design proposal.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/architecture design proposal.md b/architecture design proposal.md index afca260..21f33a7 100755 --- a/architecture design proposal.md +++ b/architecture design proposal.md @@ -148,7 +148,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. From ee751a04ee6929b9bc892f17039f38d963cea7eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Menrath?= Date: Fri, 13 Oct 2023 17:58:34 +0200 Subject: [PATCH 2/4] architecture proposal: actor mapping: give mappers more duties --- architecture design proposal.md | 34 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/architecture design proposal.md b/architecture design proposal.md index 21f33a7..b6c4354 100755 --- a/architecture design proposal.md +++ b/architecture design proposal.md @@ -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 @@ -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. From 2c1d14e07d41ade41c4995c502c8dce3d902adad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Menrath?= Date: Fri, 13 Oct 2023 18:46:51 +0200 Subject: [PATCH 3/4] event object compatibility: gancio event improvements got merged --- Event object compatibilty status.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Event object compatibilty status.md b/Event object compatibilty status.md index d4c0b3c..b85791c 100644 --- a/Event object compatibilty status.md +++ b/Event object compatibilty status.md @@ -42,3 +42,6 @@ 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 From a37479527effe088a185a7af158f099075218121 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Menrath?= Date: Fri, 13 Oct 2023 18:47:19 +0200 Subject: [PATCH 4/4] Event object compatibilty status.md aktualisiert --- Event object compatibilty status.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Event object compatibilty status.md b/Event object compatibilty status.md index b85791c..05d3480 100644 --- a/Event object compatibilty status.md +++ b/Event object compatibilty status.md @@ -41,7 +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