# Thread completion

**URL:** <https://socialhub.activitypub.rocks/t/thread-completion/4334>\
**Category:** Server to Server\
**Created:** [June 24, 2024, 7:27pm UTC](https://socialhub.activitypub.rocks/t/thread-completion/4334 "2024-06-24T19:27:29Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![heluecht](https://socialhub.activitypub.rocks/user_avatar/socialhub.activitypub.rocks/heluecht/32/195_2.png) [@heluecht](https://socialhub.activitypub.rocks/u/heluecht)\
**Post date:** [June 24, 2024, 7:27pm UTC](https://socialhub.activitypub.rocks/t/thread-completion/4334/1 "2024-06-24T19:27:29Z")

</div>

Currently there is the problem that the same thread on different systems most likely will contain different posts. This lead to tools like FediFetcher that create a high load on systems. So I think that we need some technique to distribute the posts. This can be done with these steps:

1. The original system should always forward all incoming comments to all participants of that thread (and the original receivers) (of course only when the post is public)
2. To notify the original system that some other system is interested in posts of a given thread, one could send a `Follow` request directed to the URI of the first post of the conversation. (the request should be done by the system actor and should be directed to the system actor of the other system)
3. When the `Follow` arrives, the target system should forward all currently existing comments to that server.

---

<div class="post-metadata">

**Author:** ![mk3](https://socialhub.activitypub.rocks/letter_avatar_proxy/v4/letter/m/9dc877/32.png) [@mk3](https://socialhub.activitypub.rocks/u/mk3)\
**Post date:** [June 24, 2024, 8:47pm UTC](https://socialhub.activitypub.rocks/t/thread-completion/4334/2 "2024-06-24T20:47:38Z")

</div>

This is a great area to improve! Seems like it could benefit from having a diagram to make it a bit easier to follow.

---

<div class="post-metadata">

**Author:** ![silverpill](https://socialhub.activitypub.rocks/user_avatar/socialhub.activitypub.rocks/silverpill/32/1770_2.png) [@silverpill](https://socialhub.activitypub.rocks/u/silverpill)\
**Post date:** [June 25, 2024, 1:45pm UTC](https://socialhub.activitypub.rocks/t/thread-completion/4334/3 "2024-06-25T13:45:19Z")

</div>

(1) sounds reasonable. Some servers already do that, and ActivityPub spec describes a similar solution: [7.1.2 Forwarding from Inbox](https://www.w3.org/TR/activitypub/#inbox-forwarding)

But I don’t like (2) and (3). Not all servers have system actors, and `Follow` activity targeting non-actor object also doesn’t feel right.

I’d rather load comments from `replies` or `context` collection.

---

<div class="post-metadata">

**Author:** ![heluecht](https://socialhub.activitypub.rocks/user_avatar/socialhub.activitypub.rocks/heluecht/32/195_2.png) [@heluecht](https://socialhub.activitypub.rocks/u/heluecht)\
**Post date:** [June 26, 2024, 10:35am UTC](https://socialhub.activitypub.rocks/t/thread-completion/4334/4 "2024-06-26T10:35:16Z")

</div>

Concerning the second point I don’t mind which actor is used for that. Concerning the `Follow` on non actors: Have a look at the spec: [Activity Vocabulary](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-follow)

> Indicates that the `actor` is “following” the `object`. Following is defined in the sense typically used within Social systems in which the actor is interested in any activity performed by or on the object.

In that specific case we are interested in any activity on that conversation. So from my point of view it does make sense.

Having to parse through these collections does habe two major disadvantages:

1. it puts a higher load onto the systems, since you additionally have to fetch these collections and have to fetch each individual post by yourself.
2. You would had to regularly parse through all these collections to really get all comments.

Going though the collections for my third point is okay, but for the second one this isn’t a workable solution.

Concerning your mentioned “`context` collection”: Currently I’m only aware of the `replies` collection. Who is using that?

---

<div class="post-metadata">

**Author:** ![trwnh](https://socialhub.activitypub.rocks/user_avatar/socialhub.activitypub.rocks/trwnh/32/262_2.png) [@trwnh](https://socialhub.activitypub.rocks/u/trwnh)\
**Post date:** [June 26, 2024, 3:47pm UTC](https://socialhub.activitypub.rocks/t/thread-completion/4334/5 "2024-06-26T15:47:45Z")

</div>

context is a collection in NodeBB and Streams, at least. Its usage is described in FEP-7888 (whereas usage of the replies collection is described in FEP-7458)

---

<div class="post-metadata">

**Author:** ![heluecht](https://socialhub.activitypub.rocks/user_avatar/socialhub.activitypub.rocks/heluecht/32/195_2.png) [@heluecht](https://socialhub.activitypub.rocks/u/heluecht)\
**Post date:** [June 26, 2024, 6:18pm UTC](https://socialhub.activitypub.rocks/t/thread-completion/4334/6 "2024-06-26T18:18:57Z")

</div>

Sadly it seems as if for example Mastodon does only support the `replies`. And of course it is not practically to query the `replies` collections of all posts in a thread.

---

<div class="post-metadata">

**Author:** ![devnull](https://socialhub.activitypub.rocks/user_avatar/socialhub.activitypub.rocks/devnull/32/2379_2.png) [@devnull](https://socialhub.activitypub.rocks/u/devnull)\
**Post date:** [June 26, 2024, 8:59pm UTC](https://socialhub.activitypub.rocks/t/thread-completion/4334/7 "2024-06-26T20:59:41Z")

</div>

NodeBB and Discourse will support resolvable `context`s that can be used to backfill topics. The aim is to replace the current “solution” of traversing `inReplyTo`.

At current there are no plans for synchronization of topics, but that would be something we could also discuss after an initial proof-of-concept between our respective softwares.

---

<div class="post-metadata">

**Author:** ![silverpill](https://socialhub.activitypub.rocks/user_avatar/socialhub.activitypub.rocks/silverpill/32/1770_2.png) [@silverpill](https://socialhub.activitypub.rocks/u/silverpill)\
**Post date:** [June 28, 2024, 8:04am UTC](https://socialhub.activitypub.rocks/t/thread-completion/4334/8 "2024-06-28T08:04:55Z")

</div>

> [@heluecht](#):
>
> Concerning the `Follow` on non actors: Have a look at the spec: [Activity Vocabulary](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-follow)
> 
> > Indicates that the `actor` is “following” the `object`. Following is defined in the sense typically used within Social systems in which the actor is interested in any activity performed by or on the object.
> 
> In that specific case we are interested in any activity on that conversation. So from my point of view it does make sense.

Follow activity needs to be sent to some inbox, but objects don’t have an inbox, only actors do. I think one could create a followable Application actor linked to `context` collection, or use `context` as both actor and collection at the same time (though I’m not sure if mixing core types is a good idea).

---

<div class="post-metadata">

**Author:** ![devnull](https://socialhub.activitypub.rocks/user_avatar/socialhub.activitypub.rocks/devnull/32/2379_2.png) [@devnull](https://socialhub.activitypub.rocks/u/devnull)\
**Post date:** [June 28, 2024, 1:36pm UTC](https://socialhub.activitypub.rocks/t/thread-completion/4334/9 "2024-06-28T13:36:46Z")

</div>

A `context` collection could be considered an actor by nature of having an inbox, and so topic following mechanism could theoretically be achieved through that.

But I feel like a more natural activity would be to have the `Follow` activity sent to the instance actor, with the context sent as the `object` (or maybe `target`?)

The problem is that to my knowledge there’s no way to discover an instance’s Application actor.

---

<div class="post-metadata">

**Author:** ![stevebate](https://socialhub.activitypub.rocks/user_avatar/socialhub.activitypub.rocks/stevebate/32/2763_2.png) [@stevebate](https://socialhub.activitypub.rocks/u/stevebate)\
**Post date:** [June 28, 2024, 4:13pm UTC](https://socialhub.activitypub.rocks/t/thread-completion/4334/10 "2024-06-28T16:13:52Z")

</div>

> [@silverpill](#):
>
> Follow activity needs to be sent to some inbox, but objects don’t have an inbox, only actors do

I think these kinds of statements are a bit misleading. They reflect the common microblogging implementation decisions, but may not be the best choice for other kinds of social networking applications.

A `Follow` activity must be POSTed to an inbox `endpoint` URL. That endpoint may or may not be associated with a specific actor since it might be a “shared inbox” endpoint. A shared inbox URL endpoint can exist without an “instance actor” (AKA “application actor”). How one would discover a shared inbox endpoint without an actor is not described by AP, but there are multiple ways it could be done (WebFinger, NodeInfo, HTTP headers, etc.).

Any `Object` can have an `inbox` property although AP _requires_ an `Actor` to have the property. Having an `inbox` property does not make an `Object` an `Actor`.

> [@devnull](#):
>
> But I feel like a more natural activity would be to have the `Follow` activity sent to the instance actor, with the context sent as the `object` (or maybe `target`?)

It’s not clear to me that all activities must be “sent” to specific actors when a shared inbox is used. A `Follow` activity with a source `actor` and a to-be-followed `object` URI doesn’t necessarily need any AP recipients (i.e., delivery targeting) to be processed by a server.

---

<div class="post-metadata">

**Author:** ![silverpill](https://socialhub.activitypub.rocks/user_avatar/socialhub.activitypub.rocks/silverpill/32/1770_2.png) [@silverpill](https://socialhub.activitypub.rocks/u/silverpill)\
**Post date:** [June 29, 2024, 3:47pm UTC](https://socialhub.activitypub.rocks/t/thread-completion/4334/11 "2024-06-29T15:47:22Z")

</div>

> [@stevebate](#):
>
> Any `Object` can have an `inbox` property although AP _requires_ an `Actor` to have the property. Having an `inbox` property does not make an `Object` an `Actor`.

Is there some other way to identify actors? One can check `type`, but this is not a good idea because that will prevent developers from working on use cases where none of the standard 5 types are appropriate.

---

<div class="post-metadata">

**Author:** ![stevebate](https://socialhub.activitypub.rocks/user_avatar/socialhub.activitypub.rocks/stevebate/32/2763_2.png) [@stevebate](https://socialhub.activitypub.rocks/u/stevebate)\
**Post date:** [June 29, 2024, 4:18pm UTC](https://socialhub.activitypub.rocks/t/thread-completion/4334/12 "2024-06-29T16:18:18Z")

</div>

> [@silverpill](#):
>
> Is there some other way to identify actors? One can check `type`, but this is not a good idea because that will prevent developers from working on use cases where none of the standard 5 types are appropriate.

As far as I can tell, there’s no general way to identify actor types. There’s no actor “class” in AS2 so we’re left with the standard 5 types or a multi-typed Object including at least one of the standard 5 types.

I think this is a shortcoming of the Recommendations, but I’m not convinced that using the presence of an `inbox` property as an artificial type hint is a great way to compensate for it. One can logically infer that any Object correctly referenced by an activity’s `actor` property is an actor, but that’s probably not useful in practice (?).

EDIT: As mentioned previously, the AP `inbox` was based on the LDN `inbox` concept. In LDN, an`inbox` can be associated with any RDF resource. Although AP requires an actor to have an `inbox` property is doesn’t preclude other AS2 Objects from having one as well,.

---

<div class="post-metadata">

**Author:** ![silverpill](https://socialhub.activitypub.rocks/user_avatar/socialhub.activitypub.rocks/silverpill/32/1770_2.png) [@silverpill](https://socialhub.activitypub.rocks/u/silverpill)\
**Post date:** [June 29, 2024, 4:59pm UTC](https://socialhub.activitypub.rocks/t/thread-completion/4334/13 "2024-06-29T16:59:16Z")

</div>

> [@stevebate](#):
>
> One can logically infer that any Object correctly referenced by an activity’s `actor` property is an actor, but that’s probably not useful in practice (?).

Yes, that’s not useful because objects may exist independently from activities.  
Duck typing actors by the presence of `inbox` and `outbox` is useful, and solves a lot of problems. I don’t see any downsides in that

---

<div class="post-metadata">

**Author:** ![stevebate](https://socialhub.activitypub.rocks/user_avatar/socialhub.activitypub.rocks/stevebate/32/2763_2.png) [@stevebate](https://socialhub.activitypub.rocks/u/stevebate)\
**Post date:** [June 29, 2024, 7:12pm UTC](https://socialhub.activitypub.rocks/t/thread-completion/4334/14 "2024-06-29T19:12:27Z")

</div>

> [@silverpill](#):
>
> Duck typing actors by the presence of `inbox` and `outbox` is useful, and solves a lot of problems. I don’t see any downsides in that

I understand it’s a useful kludge. I just don’t think the actor duck typing should be presented as if it’s supported or specified by the AP Recommendation (for the reasons I’ve described). That’s the downside I see. It looks like a “fallacy of the inverse” logical error. I’d rather see it described as an AP extension that solves problems in some use cases while restricting other valid AP use cases (e.g., other non-actor objects with inbox and/or outbox endpoints).

> [@silverpill](#):
>
> Yes, that’s not useful because objects may exist independently from activities.

I agree. With that approach, you can identify actors that act, but you can’t identify completely nonstandard actors that have never acted. This is a problem with the AS2 actor modeling. Maybe AS3 will fix it? 😉

---

<div class="post-metadata">

**Author:** ![heluecht](https://socialhub.activitypub.rocks/user_avatar/socialhub.activitypub.rocks/heluecht/32/195_2.png) [@heluecht](https://socialhub.activitypub.rocks/u/heluecht)\
**Post date:** [July 2, 2024, 8:59am UTC](https://socialhub.activitypub.rocks/t/thread-completion/4334/15 "2024-07-02T08:59:48Z")

</div>

> [@devnull](#):
>
> The problem is that to my knowledge there’s no way to discover an instance’s Application actor.

In Friendica we are using the `instrument` to point to the instance application actor. The `id` points to the instance actor, `type` is always `Application`, `name` is set to the instance’s name and `url` points to HTML representation of the instance. We send the `instrument` with every activity.

---

<div class="post-metadata">

**Author:** ![devnull](https://socialhub.activitypub.rocks/user_avatar/socialhub.activitypub.rocks/devnull/32/2379_2.png) [@devnull](https://socialhub.activitypub.rocks/u/devnull)\
**Post date:** [July 5, 2024, 1:59pm UTC](https://socialhub.activitypub.rocks/t/thread-completion/4334/16 "2024-07-05T13:59:30Z")

</div>

Interesting, that’s the first I’ve heard of `instrument` used in the wild — which is not surprising given that I’m still fairly new to the AP dev scene.

@stevebate makes a good point that individual inbox URLs are less important when shared inboxes are thrown into the mix. Even in NodeBB, while every Actor has a separate inbox route, a `endpoints.sharedInbox` is sent out, and they all point to the same inbox… and even if you don’t use it, it all gets routes to the same controller anyway 🙊

---

<div class="post-metadata">

**Author:** ![stevebate](https://socialhub.activitypub.rocks/user_avatar/socialhub.activitypub.rocks/stevebate/32/2763_2.png) [@stevebate](https://socialhub.activitypub.rocks/u/stevebate)\
**Post date:** [July 5, 2024, 3:18pm UTC](https://socialhub.activitypub.rocks/t/thread-completion/4334/17 "2024-07-05T15:18:15Z")

</div>

> [@heluecht](#):
>
> In Friendica we are using the `instrument` to point to the instance application actor.

Given the historical discussions (Social IRC 2018-10-13):

> 19:38 [heluecht[m]] Is there some field where I could transmit that the activity had been created and transmitted via Friendica? “generator” seems to be only used for the object, not the activity.

An Activity is an Object, so `generator` could have been used in activities too. Given the URI is identifying a generator and not the instrument the actor used to perform the activity, maybe 'generator` would have been a better choice?

Do Friendica clients use the `instrument` property for purposes other than rendering? Just curious.

---

<div class="post-metadata">

**Author:** ![heluecht](https://socialhub.activitypub.rocks/user_avatar/socialhub.activitypub.rocks/heluecht/32/195_2.png) [@heluecht](https://socialhub.activitypub.rocks/u/heluecht)\
**Post date:** [July 5, 2024, 3:30pm UTC](https://socialhub.activitypub.rocks/t/thread-completion/4334/18 "2024-07-05T15:30:36Z")

</div>

We only transmit it. I think it is helpful for debugging purposes to know the exact system and version. When we later introduced the system actor, the value had been added there.

---

<div class="post-metadata">

**Author:** ![stevebate](https://socialhub.activitypub.rocks/user_avatar/socialhub.activitypub.rocks/stevebate/32/2763_2.png) [@stevebate](https://socialhub.activitypub.rocks/u/stevebate)\
**Post date:** [July 5, 2024, 5:31pm UTC](https://socialhub.activitypub.rocks/t/thread-completion/4334/19 "2024-07-05T17:31:28Z")

</div>

> [@devnull](#):
>
> @stevebate makes a good point that individual inbox URLs are less important when shared inboxes are thrown into the mix. Even in NodeBB, while every Actor has a separate inbox route, a `endpoints.sharedInbox` is sent out, and they all point to the same inbox… and even if you don’t use it, it all gets routes to the same controller anyway 🙊

The more I think about individual inboxes in an S2S context, the less sense they make. There’s already a set of AP delivery targeting properties (to, cc, …). What would it mean to POST an activity/object to Alice’s inbox endpoint that’s explicitly targeted only to Bob? I think I’ve seen some servers that use the individual inbox as an implicit targeting directive (for the inbox owner), but other conformant servers could may drop any messages that aren’t targeted to the inbox owner. For S2S, it seems clearer to me to have a single shared inbox and deliver activity/object messages based on the targeting properties.

Like you said, that’s effectively how many servers are implemented under the hood.

We often think of AP “delivery” as inserting activities into inbox collections. However, an S2S server may not implement inbox collections (versus inbox endpoints). A readable inbox collection is mostly (only?) a C2S requirement. For S2S-only AP servers we need a different mental model of what local “delivery” means.

---

<div class="post-metadata">

**Author:** ![heluecht](https://socialhub.activitypub.rocks/user_avatar/socialhub.activitypub.rocks/heluecht/32/195_2.png) [@heluecht](https://socialhub.activitypub.rocks/u/heluecht)\
**Post date:** [July 5, 2024, 5:40pm UTC](https://socialhub.activitypub.rocks/t/thread-completion/4334/20 "2024-07-05T17:40:27Z")

</div>

When you deliver a post to a user’s inbox, we imply a BCC to that user upon receiving.
