Skip to content

Commit 84be8db

Browse files
committed
Add client behaviour for 'subscribe on send'
1 parent 648fda4 commit 84be8db

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

proposals/4306-thread-subscriptions.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ We then add a new push rule so that users can receive push notifications only fo
1515

1616
## Proposal
1717

18-
This proposal consists of three main parts:
18+
This proposal consists of four main parts:
1919
- 3 simple endpoints for subscribing to and unsubscribing from threads;
20+
- new prescribed client behaviour when the user sends a message in a thread;
2021
- new prescribed client behaviour when the user is mentioned in a thread; and
2122
- a new push rule (including a new push rule condition) that prevents notifying about threads that the user has not subscribed to.
2223

@@ -116,6 +117,16 @@ To determine this ordering, the server can consider either:
116117
In either case, servers must ensure that an automatic subscription cannot keep getting retriggered by clients.
117118

118119

120+
### New Client Behaviour: subscribe when sending in a thread
121+
122+
When a user is sending a message in a thread, the user's client SHOULD simultaneously perform a manual subscription to that thread using `PUT /subscription`.
123+
The subscription is not considered automamtic, because it was initiated by a user action (sending a message). Further, it'd be best for latency to perform the subscription concurrently with sending the message, so the client doesn't yet have an event ID to attach a hypothetical automatic subscription to anyway.
124+
125+
Clients MUST only perform these subscriptions for messages sent by the same client and at the time of the messages being sent. In other words, client MUST NOT apply them for existing messages or messages sent by other devices.
126+
127+
Clients MAY offer the user the ability to disable this feature, or disable it by default depending on use case.
128+
129+
119130
### New Client Behaviour: subscribe on mention
120131

121132
When a user is mentioned in a thread (by another user — the *mentioning user*), the user's client should perform an automatic subscription to that thread using `PUT /subscription` with `{"automatic": "$eventId"}`.

0 commit comments

Comments
 (0)