feat: MSC4306 thread subscription button and auto-subscribe behaviours#33370
Draft
nathanael-h wants to merge 1 commit intoelement-hq:developfrom
Draft
feat: MSC4306 thread subscription button and auto-subscribe behaviours#33370nathanael-h wants to merge 1 commit intoelement-hq:developfrom
nathanael-h wants to merge 1 commit intoelement-hq:developfrom
Conversation
- Add ThreadSubscriptionButton with Follow/Following text and bell icon,
placed in the thread view header.
- Subscribe-on-send: automatically PUT subscription when user sends a
message in a thread (MSC4306 Behaviour A).
- Subscribe-on-mention: automatically PUT subscription with
`{automatic: "$eventId"}` when an incoming thread event triggers a
notify push action, skipping ignored/banned senders (MSC4306 Behaviour B).
- Session-level cache to avoid duplicate PUT requests.
- Uses new matrix-js-sdk MSC4306 methods (subscribeToThread, etc.).
Depends on: matrix-org/matrix-js-sdk#5311
Ref: matrix-org/matrix-spec-proposals#4306
d0599f5 to
52567d8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PUT/DELETE/GET …/subscriptionendpoints via new matrix-js-sdk methods.PUT /subscription(manual, body{}) is issued.notifypush action,PUT /subscriptionwith{"automatic": "$causeEventId"}is sent — unless the sender is ignored/banned or we've already subscribed this session. 409M_CONFLICTING_UNSUBSCRIPTIONis gracefully swallowed.autoSubscribedThreadsSet + SDK-level cache) to avoid duplicate PUTs.Depends on: matrix-org/matrix-js-sdk#5311
Ref: matrix-org/matrix-spec-proposals#4306
Test plan
PUT /subscriptionwith{}, button toggles to "Following"DELETE /subscription, button toggles to "Follow"PUT /subscriptionwith body{}PUT /subscriptionwith{"automatic":"$eventId"}