Use m.mentions in TestThreadedReceipts instead of legacy body mentions - #920
Merged
reivilibre merged 1 commit intoSep 15, 2026
Conversation
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.
reivilibre
approved these changes
Sep 15, 2026
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.
Relevant Synapse PR: element-hq/synapse#20220.
Matrix is phasing out legacy mentions in favor of intentional mentions MSC4210. Test are supposed to have the
m.mentionsto expect receiving mention notifications.Companion Sytest change: matrix-org/sytest#1430 (same test pattern in the muted-room push test).