Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Username mentions are not handled properly when display name mentions are disabled #28335

Closed
composite9239 opened this issue Oct 30, 2024 · 4 comments
Labels
A-Notifications O-Occasional Affects or can be seen by some users regularly or most users rarely S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect X-Needs-Info This issue is blocked awaiting information from the reporter

Comments

@composite9239
Copy link

composite9239 commented Oct 30, 2024

Steps to reproduce

  1. Set notifications for "Messages containing my display name" to "Off"
  2. Set notifications for "Messages containing my username" to "Noisy"
  3. Tag yourself in another Element client such that you get the Element "mention-bubble" of the user, not just the raw username
  4. Get no notification despite being tagged directly

Outcome

What did you expect?

Receiving a noisy notification since a tag-bubble should be equivalent to the username being typed out.

What happened instead?

Received no notification. For @user:example.com it only sends a notification if user is typed, whereas it should notify for the full username (either someone typing @user:example.com or the Element mention-bubble version of that). I do not see the use case for people being notified for their bare username being written out so I assume this is not intended behavior. Tagging someone via message bubble should notify them if they want to be notified of their username being used.

Operating system

Ubuntu

Browser information

No response

URL for webapp

No response

Application version

Element version: 1.11.82 Crypto version: Rust SDK 0.7.2 (7a21514), Vodozemac 0.7.0

Homeserver

Synapse 1.117.0

Will you send logs?

No

@composite9239 composite9239 changed the title Notifications for "Messages containing my username" does not work correctly when notifications for "Messages containing my display name" are disabled Notifications for "Messages containing my username" do not work correctly when notifications for "Messages containing my display name" are disabled Oct 30, 2024
@dosubot dosubot bot added A-Notifications O-Occasional Affects or can be seen by some users regularly or most users rarely S-Major Severely degrades major functionality or product features, with no satisfactory workaround labels Oct 30, 2024
@composite9239 composite9239 changed the title Notifications for "Messages containing my username" do not work correctly when notifications for "Messages containing my display name" are disabled Username mentions are not handled properly Oct 30, 2024
@composite9239 composite9239 reopened this Oct 30, 2024
@composite9239 composite9239 changed the title Username mentions are not handled properly Username mentions are not handled properly when display name mentions are disabled Oct 30, 2024
@t3chguy
Copy link
Member

t3chguy commented Oct 30, 2024

That's because pills only include the user's displayname in the body field which is what the server-side push rule checks for.

Receiving a noisy notification since a tag-bubble should be equivalent to the username being typed out.

That just isn't the case in Matrix spec https://spec.matrix.org/v1.12/client-server-api/#user-and-room-mentions

The proper solution to this is intentional mentions, which relies on the sender sending an m.mentions field in the event, your server supporting intentional mentions and the .m.rule.is_user_mention rule being enabled.

For any further investigation we would need to see

  1. Logs
  2. Your push rules from /devtools
  3. The event source for the event not pinging you

@t3chguy t3chguy added the X-Needs-Info This issue is blocked awaiting information from the reporter label Oct 30, 2024
@composite9239
Copy link
Author

Would it be more appropriate for me to raise the issue in the Synapse repository so that the server-side push rule could be changed to also check the formatted_body field and notify user if it contains a href=\"https://matrix.to/#/@user:example.com\", for the username mentions setting specifically?

@t3chguy
Copy link
Member

t3chguy commented Oct 30, 2024

@composite9239 such a suggestion would need to be made to the Matrix spec, not the repo of just one server implementation. The Matrix spec specifies which fields to check on the built-in push rules.

@composite9239
Copy link
Author

Understood, thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Notifications O-Occasional Affects or can be seen by some users regularly or most users rarely S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect X-Needs-Info This issue is blocked awaiting information from the reporter
Projects
None yet
Development

No branches or pull requests

2 participants