matrix-org / matrix-org/matrix-rust-sdk
MSC4306 Thread Subscriptions + AllMessages notification behavior are not working together
- Dominant language
- Rust
- Stars
- 2.3k
- Forks
- 500
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 106
Description
Caveat: I think this is a situation where the feature might be written "to spec", but the spec actually renders the feature somewhat unusable.
Today, the [MSC4306](https://github.com/matrix-org/matrix-spec-proposals/blob/rei/msc_thread_subscriptions/proposals/4306-thread-subscriptions.md) Thread Subscription feature is setup to have the client 'auto-subscribe' a user to a thread if the receiving thread messages 'should notify' them. The intent of this was to make it so that being @mentioned in a thread would cause you to be subscribed to future message updates of the thread. That all works as expected, provided you have your room notification settings to Mentions.
If you have your room notification settings set to `AllMessages`, the client today will auto-subscribe you to every thread. I think this is what the spec suggests [should be the case ](https://github.com/matrix-org/matrix-spec-proposals/blob/rei/msc_thread_subscriptions/proposals/4306-thread-subscriptions.md?plain=1#L140), however the feature does not make much sense in this world. Even if you explicitly unsubscribe from a thread (via API action), the next time a message comes into the thread it "will notify" you and the SDK will resubscribe you to the thread. As written, the MSC4306 thread subscription feature does not make any sense with `AllMessages`. It becomes circular and the MSC4306 feature offers zero user controls if you have the room set to `AllMessages`
I believe what was intended here (and my company was involved in sponsoring the original build out and definition of this spec), is that you should be subscribed to the thread for 'mentions' only, not based on the room notification settings.
Contributor guide
Research direction
Start by reading the linked MSC4306 proposal, then trace the SDK behavior for AllMessages notifications, thread auto-subscription, and the explicit unsubscribe API action. Reproduce the resubscription sequence and compare it with Mentions settings. Done means the intended subscription behavior is defined and verified for both notification modes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- api, backend-api-design
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100