Skip to content

Threads 2.0: Design and implement a thread participation/subscription model #18431

Open
@reivilibre

Description

@reivilibre

See: element-hq/element-meta#2777

The homeserver should provide an API for clients to subscribe/unsubscribe from a thread.

Clients will potentially be interested in automatically subscribing to threads when their user is mentioned, or if the thread was started by their user.

Because of end-to-end encryption, the homeserver cannot auto-subscribe users e.g. when mentioned in a thread. Therefore clients will need to implement that logic themselves.
To keep things conceptually simpler, we propose that the client is always responsible for self-subscribing when conditions are right, even in unencrypted rooms.

However the homeserver must store and provide access to this subscription information, so that a user's clients can agree together on which threads are subscribed-to.

What's to be done:

  • Backend team will design and write an MSC, with the involvement of and feedback from client developers
  • Backend team will implement the MSC in Synapse, with opt-in experimental feature flags presumably
  • Backend team will implement tests in Complement, with opt-in flag

Considerations

  • We should keep the API surface and implementation simple for now
  • We should also leave the doors open for more intelligent behaviours in the future
    • e.g. being able to disable auto-subscription per-thread, per-room or globally
  • The API should be safe against concurrent access — clients may be automatically updating states in response to sync data, so there is a high likelihood of concurrent updates here.
  • The API should take care to be idempotent against repeated requests, so clients can eagerly retry requests in the face of network problems etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions