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

Implement MSC4142: Remove unintentional intentional mentions in replies #28209

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

tulir
Copy link
Contributor

@tulir tulir commented Oct 16, 2024

Fixes #27291
Implements matrix-org/matrix-spec-proposals#4142
Re-opened version of element-hq/matrix-react-sdk#30, which is a re-opened version of matrix-org/matrix-react-sdk#12511

The current spec is just a recommendation, so following it is not required and this can be merged already before the MSC is accepted. The goal of the MSC is to remove the dumb recommendation from the spec

For context:

  • Old behavior before intentional mentions: reply fallbacks caused replies to mention the sender of the replied-to message, as well as any users explicitly mentioned in the replied-to message
  • Current behavior in Element: replies mention the sender of the replied-to message, as well as all users explicitly or implicitly mentioned in the replied-to message. Implicit mentions includes any mentions from earlier in the reply chain (like the senders of all previous messages and any users ever mentioned in the chain)
  • New behavior after this PR: replies mention the sender of the replied-to message

In all cases, new explicit mentions are also of course included

@florianduros
Copy link
Member

Hi!

The MSC has not landed yet, so I'm turning back this PR to draft.
Feel free to mark as ready to review when the MSC state will change.

@florianduros florianduros marked this pull request as draft December 12, 2024 10:35
@tulir tulir marked this pull request as ready for review December 12, 2024 10:49
@tulir
Copy link
Contributor Author

tulir commented Dec 12, 2024

@florianduros the MSC being accepted requires product review here, so blocking this on the MSC landing would cause a deadlock 😅 matrix-org/matrix-spec-proposals#4142 (comment)

As mentioned in the PR description, the spec already allows changing the behavior in implementations, so this can be merged before the MSC lands, but it'd also work to get product approval here first, then merge the MSC, and finally merge this PR.

@@ -100,12 +100,6 @@ export function attachMentions(
// event + any mentioned users in that event.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this comment looks incorrect now

@richvdh
Copy link
Member

richvdh commented Jan 3, 2025

LGTM, but I believe @langleyd is checking this with the product folks.

I don't quite agree with @tulir that rejecting this would cause a deadlock, because we don't have to merge changes in EW before an MSC can land; however, I do agree that this change is consistent with the current spec and therefore we don't need the MSC to land before we merge this.

In other words, the two changes can land in either order.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Enhancement Z-Community-PR Issue is solved by a community member's PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mentioned by reply to message that mentioned me
4 participants