matrix-org / matrix-org/matrix-spec

Base push rule `.m.rule.contains_user_name` doesn't check formatted body

Open
#714 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-Push enhancement
Dominant language
HTML
Stars
330
Forks
150
Avg merge
2h 21m
Merged PRs (30d)
3

Description

The base push rule .m.rule.contains_user_name only checks the plain text body when searching for the local part. This is problematic as e.g. element web will replace pills in the formatted body with the display name for the plain text body, which results in the condition not matching the event even though the full user name is in the formatted body.

I think we haven't noticed it before because either a) people also have the display name rule enabled, or b) their display name contains the user's localpart.

c.f. https://github.com/matrix-org/synapse/issues/8715

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the .m.rule.contains_user_name definition in the Matrix specification and compare how it checks the plain-text and formatted bodies. The issue is complete when the rule's documented behavior accounts for a user name present in the formatted body, with the relevant specification text updated.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.