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

Mentioned by reply to message that mentioned me #27291

Open
Kladki opened this issue Apr 7, 2024 · 9 comments · May be fixed by element-hq/matrix-react-sdk#30
Open

Mentioned by reply to message that mentioned me #27291

Kladki opened this issue Apr 7, 2024 · 9 comments · May be fixed by element-hq/matrix-react-sdk#30
Labels
A-Replies reply O-Occasional Affects or can be seen by some users regularly or most users rarely S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect X-Needs-Product More input needed from the Product team

Comments

@Kladki
Copy link

Kladki commented Apr 7, 2024

Steps to reproduce

  1. Send a message that mentions a user
  2. Reply to that message
  3. Reply to the previous reply
  4. Reply to the previous reply

and so on...

Outcome

What did you expect?

I expected I would only be mentioned by the message that actually mentioned me, as I do not want to be constantly mentioned in messages that may have nothing to do with me
It also isn't clear why I am mentioned in this case, because there is no visible indicator of my name or anything by the second reply, and it seems that many don't expect/are unaware of this behavior.

What happened instead?

I am mentioned by all messages that recursively reply to a message that mentions me.

You can see in the raw json in all recursive messages I am mentioned intentionally:

{
  "content": {
    "body": "> <@root:conduit-test-server.ahouansou.cz> hi\n\nhi",
    "format": "org.matrix.custom.html",
    "formatted_body": "<mx-reply><blockquote><a href=\"https://matrix.to/#/!kzWXGdAbtsmxSbwkNg:synapse-test-server.ahouansou.cz/$gmY2TB1LRa0D4b2muCtW51D5fl--Noxh_TE8ltJ6J18?via=ahouansou.cz&via=conduit-test-server.ahouansou.cz&via=synapse-test-server.ahouansou.cz\">In reply to</a> <a href=\"https://matrix.to/#/@root:conduit-test-server.ahouansou.cz\">@root:conduit-test-server.ahouansou.cz</a><br>hi</blockquote></mx-reply>hi",
    "m.mentions": {
      "user_ids": [
        "@matthias:ahouansou.cz"
      ]
    },
    "m.relates_to": {
      "m.in_reply_to": {
        "event_id": "$gmY2TB1LRa0D4b2muCtW51D5fl--Noxh_TE8ltJ6J18"
      }
    },
    "msgtype": "m.text"
  },
  "event_id": "$xVaz4XYilJOGx9yFcR0KJrM0Q_4_vjv1wMUMUHVo7g8",
  "origin_server_ts": 1712509186956,
  "sender": "@root:conduit-test-server.ahouansou.cz",
  "type": "m.room.message",
  "unsigned": {
    "age": 1
  },
  "room_id": "!kzWXGdAbtsmxSbwkNg:synapse-test-server.ahouansou.cz"
}

Operating system

Alpine Linux Edge

Application version

Element version: 1.11.63 Crypto version: Rust SDK 0.7.0 (b1918e9), Vodozemac 0.5.1

How did you install the app?

Alpine linux package manger (apk): https://pkgs.alpinelinux.org/packages?name=element-desktop

Homeserver

Conduit 0.7.0-alpha (2c73c3ad)

Will you send logs?

No

@Kladki Kladki added the T-Defect label Apr 7, 2024
@t3chguy
Copy link
Member

t3chguy commented Apr 8, 2024

Sounds like your server doesn't support m.mentions push rules. This isn't something the client can work around as both client & server apply the same push rules.

@t3chguy t3chguy closed this as not planned Won't fix, can't repro, duplicate, stale Apr 8, 2024
@Kladki
Copy link
Author

Kladki commented Apr 8, 2024 via email

@t3chguy
Copy link
Member

t3chguy commented Apr 8, 2024

I am presuming you are @root:conduit-test-server.ahouansou.cz - you did not specify which MXID is yours.

Once Intentional Mentions is supported by both the Client & Server (it is supported by Element Web & Desktop already) then the m.mentions field takes over and your MXID is not simply grepped out of the body. The way the check is done is defined by the spec (push rules) and the client must implement it like that otherwise the notifications will work differently for encrypted & unencrypted rooms and the client would be spec-incompliant. Once your server supports Intentional Mentions it'll fix cases like this.

image

Related element-hq/element-meta#2067
Related element-hq/element-meta#1623
Related element-hq/element-meta#886

@Kladki
Copy link
Author

Kladki commented Apr 8, 2024

Sorry, my bad. I (the user being unintentionally mentioned) am @matthias:ahouansou.cz. @root:conduit-test-server.ahouansou.cz is the user replying to a reply of a reply of a reply of a message that mentions me.

I am using element desktop, root is on element web (Element version: 1.11.63
Crypto version: Rust SDK 0.7.0 (b1918e9), Vodozemac 0.5.1)

@t3chguy
Copy link
Member

t3chguy commented Apr 8, 2024

Sounds like the sender's @root:conduit-test-server.ahouansou.cz client intentionally mentioned you then, given you are listed in the m.mentions. You'd need them to open an issue with whatever client project they are using and include logs.

@Kladki
Copy link
Author

Kladki commented Apr 8, 2024

Sorry, I edited the message above and added that root is using element web, (Element version: 1.11.63
Crypto version: Rust SDK 0.7.0 (b1918e9), Vodozemac 0.5.1). I will go get logs.

@Kladki
Copy link
Author

Kladki commented Apr 8, 2024

Logs have been sent, can we please re-open this issue since the client being used was element web?

@tulir
Copy link
Contributor

tulir commented May 11, 2024

Made a MSC and PR to fix the silly recommendation in the spec: matrix-org/matrix-spec-proposals#4142 / matrix-org/matrix-react-sdk#12511

@dbkr dbkr added X-Needs-Product More input needed from the Product team S-Minor Impairs non-critical functionality or suitable workarounds exist O-Occasional Affects or can be seen by some users regularly or most users rarely A-Replies reply labels Sep 12, 2024
@dbkr
Copy link
Member

dbkr commented Sep 12, 2024

Product folk: does this match your idea of how element should work? ie. I mention Bob in a message, someone else replies to that message, should Bob's client go ping again? We have a community PR ready to fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Replies reply O-Occasional Affects or can be seen by some users regularly or most users rarely S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect X-Needs-Product More input needed from the Product team
Projects
None yet
4 participants