Skip to content

Use m.mentions in TestThreadedReceipts instead of legacy body mentions - #920

Merged
reivilibre merged 1 commit into
matrix-org:mainfrom
barodeur:barodeur/disable-legacy-mention-rules-by-default
Sep 15, 2026
Merged

reivilibre merged 1 commit into
matrix-org:mainfrom
barodeur:barodeur/disable-legacy-mention-rules-by-default

Conversation

@barodeur

@barodeur barodeur commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

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.mentions to expect receiving mention notifications.

Companion Sytest change: matrix-org/sytest#1430 (same test pattern in the muted-room push test).

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
reivilibre merged commit f41b123 into matrix-org:main Sep 15, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants