element-hq / element-hq/synapse

Base push rule `contains_user_name` should check formatted body

Open
#8,715 0 comments 0 reactions 0 assignees View on GitHub
A-Push T-Enhancement
Dominant language
Python
Stars
4.6k
Forks
600
Avg merge
5d 22h
Merged PRs (30d)
51

Description

This issue has been migrated from [#8715](https://github.com/matrix-org/synapse/issues/8715).

---

### Description

### Steps to reproduce

Have your notification settings in element web (or element android) set to:

Messages for my display name: None
Messages for my user name: Noisy

Send this message - this was generated in element web by typing "mich" then adding "and again this should notify my phone".

```
"content": {
"body": "Michael: this should notify my phone",
"format": "org.matrix.custom.html",
"formatted_body": "Michael: this should notify my phone",
"msgtype": "m.text"
},
```

Send instead this message:

```
"content": {
"body": "this room is unencrypted; the message contained my user name (delph) and i have msgs containing my user name set to Noisy",
"msgtype": "m.text"
},
```

It doesn't matter if the channel is encrypted or not.

And a notification is sent through and element web highlights the message - this doesn't even have my user name it with the server included, so i would still be highlighted on other servers.

I cannot use my display name notification on "Michael" as there are a number of people with that name in the wild, and i don't want to be notified that people are talking to them.

I want to be notified only when someone uses the pill that contains my user ID, and i rely on this behaviour - i'm not sure when this stopped working but at the moment I simply don't get informed when people are talking to me, and have to manually scrape channels looking for my name.

I'm sure this worked before - users would have to send a pill and i would be notified of it, but I can't say when it's broken - i've just noticed it in the last few weeks.

### Version information

Running on matrix.org (test messages sent over federation from another server)
Using stock element web and element-android - no dev versions installed.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.