Conversation
Matrix v1.17 removed `.m.rule.contains_display_name`, `.m.rule.contains_user_name` and `.m.rule.roomnotif` from the base push rule set. Default `msc4210_enabled` to `true` so that Synapse serves the v1.17 rule set; the option remains as an opt-out.
… merge) Synapse CI only fetches Complement from matrix-org/complement, so the matching Complement branch on the fork is never picked up. Try the fork first, falling back to matrix-org, so this PR can be tested against that branch before it is merged into Complement main. Revert before merging.
… (do not merge)" This reverts commit 9d89533.
erikjohnston
pushed a commit
to matrix-org/sytest
that referenced
this pull request
Sep 15, 2026
…ention (#1430) "Don't get pushed for rooms you've muted" expects the second message to be pushed because its body contains the recipient's user ID. That relies on the legacy .m.rule.contains_user_name push rule, which Matrix v1.17 (MSC4210) removes and which Synapse disables by default from 1.161.0 (element-hq/synapse#20220). Send an intentional mention via m.mentions instead, so the message is pushed by .m.rule.is_user_mention on every server that follows the current spec.
reivilibre
pushed a commit
to matrix-org/complement
that referenced
this pull request
Sep 15, 2026
#920) The two messages that are expected to highlight Bob only contained his user ID in the body text. That relies on the legacy push rules `.m.rule.contains_user_name` / `.m.rule.contains_display_name`, which Matrix v1.17 removes (MSC4210). Synapse disables them by default from 1.161.0 (element-hq/synapse#20220), so the test fails there with `highlight_count: 0`. Add an `m.mentions` block to both messages so they are highlighted via `.m.rule.is_user_mention` (Matrix v1.7). The expected counts are unchanged: a message with `m.mentions` produces exactly one highlight whether or not the legacy rules are enabled.
sandhose
approved these changes
Sep 21, 2026
| "m.room.message", | ||
| { | ||
| "msgtype": "m.text", | ||
| "body": "Oh, user, hello!", |
Member
There was a problem hiding this comment.
I feel like we should not be mentioning the display name in the body anymore, as what we want to test is the intentional mention? Not really a strong opinion about this
Collaborator
Author
There was a problem hiding this comment.
I see what you mean.
I think we should try to keep a realistic payload in those higher level tests so probably @user in the body as well as the appropriate m.mentions.
But I agree in other tests, some lower level unit tests, we could verify that m.mentions is sufficient without @user or the display name being present in the body.
| "m.room.message", | ||
| { | ||
| "msgtype": "m.text", | ||
| "body": "@room eeek! There's a spider on the table!", |
The message body used the bare display name, which is what the legacy mention rules matched on. Write it as a client would render a mention pill, `@user`, next to `m.mentions`, and name and document the test accordingly.
This branch has not been deployed
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.
🚨⚠️ DO NOT MERGE. This will break Element Web: element-hq/element-web#35032
Fix element-hq/element-web#35031
Part of #19415 (Support Matrix 1.17).
Companion test PRs:
What this does:
experimental_features.msc4210_enableddefault value changedtrue(MSC4210). The rest of the changes is fixing the tests, making sure test relying en mentions sends the properm.mentionsattribute.Migration plan
Element Web has been writing both rule sets together since September 2023 (matrix-react-sdk#11667, element-web@0d367a7c7e), so for its users
.m.rule.is_user_mentionand.m.rule.is_room_mentionalready carry the same customisations as the legacy rules.For everyone else, #20215 adds a background update that migrates the overrides on the legacy rules to the intentional ones.Opt-out
Pull Request Checklist
EventStoretoEventWorkerStore.".code blocks.