-
Notifications
You must be signed in to change notification settings - Fork 252
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ui):
Timeline::send_reply
correctly sets up m.mentions
.
In #2691, I suppose that the way `add_mentions` is computed is… wrong. `AddMentions` is used to automatically infer the `m.mentions` of the reply event based on the original/replied event. The way it was computed was based on the reply event `mentions`, which seems wrong: if the reply contains mentions, then the sender should be part of it? Nah. That's a bug. We want the reply event to automatically mention the sender of the original event if it's not the same as the current user, i.e. the sender of the reply event. This patch fixes the `add_mentions` calculation. This patch also updates a test and adds another test to ensure that `m.mentions` is correctly defined when replying to an event.
- Loading branch information
Showing
2 changed files
with
152 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters