-
Notifications
You must be signed in to change notification settings - Fork 416
MSC4306: Thread Subscriptions #4306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 2 commits
3f1e83a
2a72ee4
10e52b0
c901734
f0a7680
513811f
a3dbc87
e1ad4b2
648fda4
84be8db
c974c02
d923774
c3fecfa
d5fd6b0
c05b485
f0a32bf
bd9e842
9db41d8
bd90ea3
212345a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -176,9 +176,9 @@ As motivation, we want threads to have the following notification semantics: | |
| - Exceptions: if the user is mentioned, this should generate a notification as usual. (The push notification thus generated is also useful for the client to realise it needs to create an automatic thread subscription.) | ||
| - Messages in subscribed threads should always count as a notification, and the (effective) room notification settings should not matter at all. E.g. the room can be muted, but if I, as a user, am subscribed to a thread, I still want to get a notification for new messages in that thread. If I do not want that, then I will unsubscribe. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When a user mutes a room, it puts an override rule in for that room. And this override rule is the highest priority So this is not possible to receive notification from a thread in a muted room.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For what it's worth, I thought there was a little chicken-and-egg problem here, in the case of a new automatic subscription, but turns out there might not be. Say I receive an event that would automatically subscribe me to a thread I haven't subscribed to (nor unsubscribed from). At this point, the thread subscription push rule wouldn't be triggered, because the subscription doesn't exist quite yet. But I'd expect the client to still notify about the thing! However, if an automatic subscription were to happen, that's likely because other push rules decided so: I've been mentioned in the thread, or there was a keyword mention, or something else. So there should be some notification created for that other event, which then causes the automatic subscription to the thread. A notification will exist for the initial event that causes an automatic subscription; it is just not created by the new push rule yet. Future events in this thread will imply notifications because of the thread subscription push rule. Am I getting this right? If so, it may be worth mentioning this around here, to help client implementations?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, you have it right. Though looking at it now, this |
||
|
|
||
| To achieve this, we propose the addition of two new push rules: | ||
| To achieve this, we propose the addition of two new push rules, both added to a new push rule `kind` called `postcontent`, which is ordered between `content` and `room` but which can contain general-purpose rules: | ||
|
|
||
| 1. an `underride` push rule, called `.m.rule.unsubscribed_thread`, at the beginning of the underride list. This rule causes events in unsubscribed threads to skip notification processing without generating a notification. | ||
| 1. `.m.rule.unsubscribed_thread`, at the beginning of the underride list. This rule causes events in unsubscribed threads to skip notification processing without generating a notification. | ||
reivilibre marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| The rule occurs after mention-specific rules and keyword mention rules, meaning that mentions continue to generate notifications. | ||
| ```jsonc | ||
| { | ||
|
|
@@ -194,7 +194,7 @@ To achieve this, we propose the addition of two new push rules: | |
| "actions": [] | ||
| } | ||
| ``` | ||
| 2. an `underride` push rule, called `.m.rule.subscribed_thread`, at the beginning of the underride list (following `.m.rule.unsubscribed_thread`). This rule causes events in subscribed threads to generate notifications. | ||
| 2. `.m.rule.subscribed_thread`, at the beginning of the underride list (following `.m.rule.unsubscribed_thread`). This rule causes events in subscribed threads to generate notifications. | ||
reivilibre marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ```jsonc | ||
| { | ||
| "rule_id": ".m.rule.subscribed_thread", | ||
|
|
@@ -221,6 +221,33 @@ The `thread_subscription` push condition is satisfied if and only if all the fol | |
| 1. the event, which we are running push rules for, is part of a thread. | ||
| 2. the user is subscribed to the thread (`subscribed` = `true`) or is not subscribed to the thread (`subscribed` = `false`). | ||
|
|
||
| ### Explanation of the rationale behind the `postcontent` push rule kind | ||
|
|
||
| We need a new push rule kind ordered between `content` and `room` because: | ||
|
|
||
| **For `.m.rule.unsubscribed_thread`** | ||
| - this rule must come after any keyword mentions the user has configured (which would be configured in `content`) | ||
| as those should still trigger mentions (and thus automatic thread subscriptions). | ||
| - the rule must come before any room settings the user has configured, such as notifying on all messages in a room, | ||
| as that would cause automatic subscriptions to every thread in the room and it would cause inconsistencies | ||
| between the default 'notified for all messages' behaviour and 'notified for all messages in this room'. | ||
|
|
||
| **For `.m.rule.subscribed_thread`** | ||
| - it seems inappropriate for an `override` rule to produce notifications, given the `override` rules generally | ||
| are intended to suppress them. | ||
| - more concretely, we should allow rules in the `override` and `content` block the opportunity to produce | ||
| notifications with specific tweaks, e.g. `content` rules to match mentions might highlight the messages | ||
| rather than simply notifying. | ||
| - `.m.rule.contains_user_name` and user-specified keyword mention rules must therefore execute first | ||
| so they can make use of `"set_tweak": "highlight"`. | ||
| - this rule should come after `content` in case any users perform negative filtering (i.e. suppressing | ||
| notifications for messages containing certain keywords), although the author is not aware of clients with | ||
| such functionality. | ||
| - this rule must come before `room` to avoid thread subscriptions being defeated by user rules such as | ||
| the ones underlying 'Mentions only' or 'Mentions & Keywords' settings available in common clients. | ||
|
|
||
| For the time being, servers MUST ensure that clients MUST NOT be able to create custom rules with this push rule kind. | ||
reivilibre marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| ## Limitations and Potential Future Expansions | ||
|
|
||
| - Users will not have enough granularity to subscribe to threads in a way that lets them keep track of threads (being able to 'catch up' through some mechanism in their client) without also getting notifications for them, except by disabling ALL thread subscription notifications altogether. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An API listing active subscriptions per room might also make unsubscribing easier?