-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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.)
MSC3952 states that clients may wish to include the user being replied to in the mentions array; this is handled properly for normal messages, content messages, voice messages, and command messages. It is not handled properly when editing a message which is a reply. 1
The result of this is that the user being replied to gets dropped from the mentions array after the edit, which is incorrect. Note that the top-level mentions object only includes newly (in that edit) mentioned people (which the replied person will not be), but the one under m.new_content should include all the users being replied to.
I think all that is necessary is fetching the replied-to MatrixEvent and passing it into attachMentions, but it might need further testing.
Footnotes
-
As an aside it looks like the editing code also double-checks the
SettingsStoreto ensure intentional mentions are enabled. This was probably left-over from refactoring and we should remove it when updating this logic to properly handle replies. ↩