Skip to content

Add sanity checks to prevent users from ignoring themselves #30079

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

Merged
merged 6 commits into from
Jun 4, 2025

Conversation

MidhunSureshR
Copy link
Member

@MidhunSureshR MidhunSureshR commented Jun 4, 2025

For #29969

  • It's not clear to me how the membership event could change without the UI changing but nevertheless this PR adds an explicit check to ensure that users don't ignore themselves.
  • onDeclineButtonClicked should set rejecting state to true so that the UI reflects an ongoing decline.

Copy link
Member Author

Choose a reason for hiding this comment

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

The room name is constructed from a global variable that is incremented in beforeEach. If you add a new test, you're running beforeEach one more time than before and thus you get a different room name which causes the snapshot checks to fail.

Should be fixed but definitely not in this PR.

@MidhunSureshR MidhunSureshR marked this pull request as ready for review June 4, 2025 08:06
@MidhunSureshR MidhunSureshR requested a review from a team as a code owner June 4, 2025 08:06
Copy link
Member

@t3chguy t3chguy left a comment

Choose a reason for hiding this comment

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

This is a sane sanity check, but surely if we're rendering this state we could just stash the inviter earlier in the process to not lose it, how is this error presented to the user? Doesn't look translatable.

@MidhunSureshR MidhunSureshR added this pull request to the merge queue Jun 4, 2025
Merged via the queue into develop with commit b9f319a Jun 4, 2025
36 checks passed
@MidhunSureshR MidhunSureshR deleted the midhun/ignore-bug/block-button branch June 4, 2025 17:58
snowping pushed a commit to Novaloop-AG/element-web that referenced this pull request Jun 22, 2025
…hq#30079)

* Fix missing state

* Throw error if membership event changes

* Write test

* Fix broken tests

* Cache inviter when room is loaded

* Translate error message for dialog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants