Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ui): Timeline::send_reply correctly sets up m.mentions #3341

Merged
merged 1 commit into from
Apr 23, 2024

Commits on Apr 23, 2024

  1. fix(ui): Timeline::send_reply correctly sets up m.mentions.

    In matrix-org#2691, I suppose
    the way `add_mentions` is computed is… wrong. `AddMentions` is used to
    automatically infer the `m.mentions` of the reply event based on the
    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 replied event if and only
    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.
    Hywan committed Apr 23, 2024
    Configuration menu
    Copy the full SHA
    97ce574 View commit details
    Browse the repository at this point in the history