Implement MSC4142: Remove unintentional intentional mentions in replies (#28209)
* Implement MSC4142: Remove unintentional intentional mentions in replies * Fix comment
This commit is contained in:
@@ -432,8 +432,6 @@ describe("<EditMessageComposer/>", () => {
|
||||
user_ids: [
|
||||
// sender of event we replied to
|
||||
originalEvent.getSender()!,
|
||||
// mentions from this event
|
||||
"@bob:server.org",
|
||||
],
|
||||
},
|
||||
},
|
||||
|
||||
@@ -194,7 +194,7 @@ describe("<SendMessageComposer/>", () => {
|
||||
"m.mentions": { user_ids: ["@bob:test"] },
|
||||
});
|
||||
|
||||
// It also adds any other mentioned users, but removes yourself.
|
||||
// It no longer adds any other mentioned users
|
||||
replyToEvent = mkEvent({
|
||||
type: "m.room.message",
|
||||
user: "@bob:test",
|
||||
@@ -205,7 +205,7 @@ describe("<SendMessageComposer/>", () => {
|
||||
content = {};
|
||||
attachMentions("@alice:test", content, model, replyToEvent);
|
||||
expect(content).toEqual({
|
||||
"m.mentions": { user_ids: ["@bob:test", "@charlie:test"] },
|
||||
"m.mentions": { user_ids: ["@bob:test"] },
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user