Add proper support for Mentions (through matching MXID on both formatted_body
and body
)
#19833
Labels
A-Notifications
A-Pills
O-Frequent
Affects or can be seen by most users regularly or impacts most users' first experience
T-Enhancement
X-Spec-Changes
Your use case
This ticket is a few issues, and one recommendation, rolled into one.
First, i've always been annoyed by the inconsistent mention system, which currently supports 3 methods of pinging;
@room
None of these do what i otherwise expect, coming from discord; Explicit mentions.
Element has these, but none of above notification options explicitly target that.
The illusion of explicit mentions is created by the fact that two of the above options overlap separately with a mention's content.
A message with a mention looks like the following;
Here, I will get pinged on the
Displayname
category, as Element's pushers will match onbody
, check my displayname, and ping me when it contains that displayname.This is alright, if it werent for the fact that the following can also happen;
This is a reply, notice how the
body
of it contains "jonathan" as well, although embedded inside a few characters. This pinged me as well, because of my display name, this makes choosing that option annoying to me.Now, consider the next case, my username is
jboi
on my instance, and this problem popped up the first few moments i turned on a bridge;The
jboi.nl
part of my bridge's domain name caused the pusher to match on these messages. Admittedly, this is a bridge problem as well, but it made me unable to enable that particular notification option.Second, I sometimes don't get pinged.
This is a rare enough occurrence that i don't have data on it (sorry), but what I do know is that every time there were pills involved.
In the meantime, i have display name notifications enabled, and i tried enabling a "keyword" with my username (
@jboi:jboi.nl
), but that one didn't seem to work.However, i've figured out why;
Pushers only match on
body
.Look at this following event format, for this experiment, i had disabled display name notifications;
This event should in theory be pinging me, because i enabled the keyword. However, because of rich message fallbacks, the keywords only get matched on
body
, and theformatted_body
is completely ignored.The following event, however, does ping me;
Third, here is my suggestion on how to fix this, and fulfil a feature request;
Add an extra notification option, which creates a pusher which matches the user's
MXID
on bothbody
andformatted_body
.The rationale for this is that, while keywords dont work on
formatted_body
(though that could be an alternative), users will expect mentions/pings/pills to "just work", this was my first expectation with element as well, and the above cases of Display Name and Username pinging, with more false positives than not, have soured my satisfaction on that front a lot.So, add a "Mention" option that "Just Works", which will be a hack (as it is a glorified keyword match on
body
andformatted_body
), but until proper mention support arrives (where a ping is not an<a>
HTML tag, but a numerated list, for example), I think this is a shiny low-hanging fruit.Have you considered any alternatives?
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: