This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Implement MSC3930: polls push rules #14787
Merged
Merged
Changes from 11 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
23c1dc0
Add an experimental config option for MSC3930
anoadragon453 f9f3ea1
Implement MSC3930: Polls push rules & notifications
anoadragon453 206349e
Enable support for msc3930 in synapse's complement runs
anoadragon453 ee1b3fa
changelog
anoadragon453 33e6e91
Fix up arguments to FilteredPushRules, PushRuleEvaluator
anoadragon453 b63b2ff
Organise MSC* arguments alphabetically
anoadragon453 5954833
Rename msc3930_enabled -> msc3381_polls_enabled
anoadragon453 f96f86c
Catch a behavioural change after argument order shuffling
anoadragon453 78bf8b0
Run cargo fmt
anoadragon453 0527397
Simplify experimental option checking when filtering push rules
anoadragon453 34ba120
Merge branch 'develop' of github.com:matrix-org/synapse into anoa/msc…
anoadragon453 263e825
Merge branch 'develop' of github.com:matrix-org/synapse into anoa/msc…
anoadragon453 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Implement experimental support for MSC3930: Push rules for (MSC3381) Polls. |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
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.
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.
Does the placement in the order here matter? The MSC doesn't state where it goes.
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.
Hmm, the ordering of these rules will matter yes. We want the
*one_to_one
rules to be tested in clients first before their group room counterparts. I'm a little confused on how priority works in push rules though. The spec seems to imply that rules are checked by kind, then an "ordering priority". I'm guessing the latter is the order that the rules are sent to clients in, rather than a field? It's a bit vague though.We can also just sidestep the ordering requirement by placing a
room_member_count>2
condition on the group room rules, but that shouldn't be necessary.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.
Note that I have asserted the ordering in the Complement tests: https://github.com/matrix-org/complement/pull/578/files#diff-ce4102a82b595c7b72d6f945db418fbc7d34ff7973f5ca6e8935ad98a09273d2R161
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.
Sorry for being unclear! I meant how did you decide this went after
global/underride/.im.vector.jitsi
.I think internally the ordering is reasonable and matches the MSC.
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.
Oh! I didn't consider ordering against other
underride
push rules. But perhaps this should go aboveglobal/underride/.m.rule.encrypted
, such that clients match this push rule before the generic "encrypted message" one?Though that does make me question all of the other non-state event-related rules in this file. Shouldn't they go above rules that match generic
m.room.encrypted
events? I suppose the client must be doing some mangling of the order here/filtering out of them.rule.encrypted
rule(s) already?It turns out matrix-react-sdk is just sorting known rules client-side anyways into this order. Unknown rules appear at the end in the order they were received from the homeserver. Interestingly the generic
EncryptedMessage
andEncryptedDM
rules are put in front. I'm not sure how this achieves the desired result unless there's additional logic I'm missing.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.
My understanding was the spec mandates an order (and thus MSCs must define an order).
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.
Have tried to get some clarity in matrix-org/matrix-spec-proposals#3930 (comment).
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.
We've been given the go ahead to define our own ordering for now: matrix-org/matrix-spec-proposals#3930 (comment)