From 6db51e4893e32c603a93a7570d3db4e412f0a8c2 Mon Sep 17 00:00:00 2001
From: a
Date: Wed, 6 Nov 2024 05:21:43 -0600
Subject: [PATCH] 7888: clarify base case, fix discussion link
---
fep/7888/fep-7888.md | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/fep/7888/fep-7888.md b/fep/7888/fep-7888.md
index 7bcd0d3..4b48dcf 100644
--- a/fep/7888/fep-7888.md
+++ b/fep/7888/fep-7888.md
@@ -4,7 +4,7 @@ authors: a
status: DRAFT
dateReceived: 2023-03-14
trackingIssue: https://codeberg.org/fediverse/fep/issues/68
-discussionsTo: https://codeberg.org/fediverse/fep/issues/68
+discussionsTo: https://socialhub.activitypub.rocks/t/fep-7888-demystifying-the-context-property/3021
---
# FEP-7888: Demystifying the context property
@@ -83,11 +83,13 @@ When encountering an object with a `context` as a consumer or browser:
- Viewing the collection directly and encountering the object as a collection item.
- Querying the collection via some querying mechanism that allows determining if an object is included in a collection.
- Having knowledge that the object was Added to the collection in question, without knowledge of a subsequent Remove.
+- Otherwise, if a `context` resolves to an Object that is not a Collection, or if you cannot resolve the `context` by its `id`, then that object's `id` SHOULD be used for grouping together objects sharing the same `context`.
+ - The source for objects that are being considered for inclusion is arbitrary. Consumers may consider all objects in their cache, or all objects in some database, or all objects in an unrelated collection like an actor's outbox or inbox, or some combination of these.
When encountering an object with a `context` and choosing to author your own object or activity that interacts with it:
- You MAY copy a `context` as-is, if you wish for your object to be included in that same context.
- - If you do this, you SHOULD send your activity to the owner(s) of the context(s), defined via `context.attributedTo` if resolvable.
+ - If you do this, you SHOULD send your activity to the owner(s) of the context(s), defined via `context.attributedTo` if resolvable. This is similar to how one might address the author of an object that they are responding to via `inReplyTo`, as a social courtesy.
- You MAY set your own `context`, if you wish for your object to be in a separate context owned by you.
- You MAY remove the `context` entirely, if you wish for your object to exist on its own.
@@ -106,9 +108,9 @@ Upon receipt of an activity where a `context` is owned by you, or where the acti
Because [PUB] does not define the use of `context` as a property, it is up to ActivityPub Clients to manage contexts for themselves. The following algorithm may be used to create an object within a context collection:
-1. Create the `Collection` representing the context. Save the generated Collection `id` to be used in the next step.
-2. Create the `Object` and specify the `context` as the `id` obtained in step 1. Set an appropriate `audience` or use `to`/`cc` to deliver the Create activity as-is. Save the returned Object or its `id` to be used in the next step.
-3. Add the `Object` to the context `Collection`, using the response from step 2. You may wish to deliver this Add activity `to`/`cc` your intended recipients, especially if you did not deliver the Create Object from step 2.
+1. Create the Collection representing the context. Save the generated Collection `id` to be used in the next step.
+2. Create the Object and specify the `context` as the `id` obtained in step 1. Set an appropriate `audience` or use `to`/`cc` to deliver the Create activity as-is. Save the returned Object or its `id` to be used in the next step.
+3. Add the Object to the context Collection, using the `id`s obtained from the responses for steps 1 and 2. You may wish to deliver this Add activity via `to`/`cc`/`audience` targeting your intended recipients, especially if you did not deliver the Create Object from step 2.
### Examples
@@ -196,9 +198,10 @@ The resulting state of the context collection is now like so:
}
```
-Third-party observers (such as members of `https://domain.example/context-audience`) can validate the Add activity by using the following checks:
+Third-party observers (such as members of `https://domain.example/context-audience`) can validate or identify the Add activity as modifying a context collection by using the following checks:
-- `Add.actor` == `context.attributedTo` (the actor is allowed to modify a collection that they own)
+- `Add.actor` == `target.attributedTo` (the actor is allowed to modify a collection that they own)
+- `target` == `object.context` (the object is being added into its declared context)
#### Example 2: Choosing not to participate in the same context