-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
As part of #24377 initial support for MSC3952 was implemented in #9983. That implementation has a couple of bugs/deficiencies to fix-up around editing messages. (The below all assume you have MSC3952 support enabled.)
Currently if you're mentioned in a message it is displayed as red, if that message is then edited (e.g. fix a typo) it is no longer red. The implementation runs push rules over the event and if any event is a highlight than it gets displayed in red. See UnwrappedEventTile.shouldHighlight
. This logic needs to be updated somehow for intentional mentions:
- @daniellekirkwood suggested that if the message or any version of it every notified the user (via a highlight) than the event should be red. (See conversation around here.)
- Another option (which the MSC suggests) is that the latest edit-only should be checked for mentions. This would be done by checking the mentions property of
m.new_content
instead of the root-level.- Implementation-wise, I'm not really sure how to do this, one option could be to "clone" the event, but replace the
content
withcontent["m.new_content"]
and then run push rules over that to see if there are any highlights).
- Implementation-wise, I'm not really sure how to do this, one option could be to "clone" the event, but replace the
While doing this we should be sure to consider both user mentions & room mentions and that the push rules can be disabled by the user.
Similarly to the red text, we sure ensure the state of your own pill (if one exists) is consistent with whether the message itself is treated as a highlight or not.
- Someone mentioned me in a message.
- They then edit the content (not the mentions)
- My mention is still red
This matches the behavior pre-MSC3952, which is broken by MSC3952's implementation.
This should apply to both pre-MSC3952 and MSC3952 mentions