Skip to content

Fix left room membership change #4765

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 2 commits into from
May 27, 2025

Conversation

ganfra
Copy link
Member

@ganfra ganfra commented May 22, 2025

Content

Ensure the right message is used when leaving room, according to the current membership :

  • when leaving room
  • when cancelling knock
  • when declining invite

Also add some tests to ensure the room.leave triggers the correct membership change.

Motivation and context

Fix regression from removing RoomPreview leave usage.
Because of this the message was always "Left room".

Screenshots / GIFs

No ui change.

Tests

  • Step 1
  • Step 2
  • Step ...

Tested devices

  • Physical
  • Emulator
  • OS version(s):

Checklist

  • Changes have been tested on an Android device or Android emulator with API 24
  • UI change has been tested on both light and dark themes
  • Accessibility has been taken into account. See https://github.com/element-hq/element-x-android/blob/develop/CONTRIBUTING.md#accessibility
  • Pull request is based on the develop branch
  • Pull request title will be used in the release note, it clearly define what will change for the user
  • Pull request includes screenshots or videos if containing UI changes
  • You've made a self review of your PR

@ganfra ganfra added the PR-Bugfix For bug fix label May 22, 2025
@ganfra ganfra marked this pull request as ready for review May 22, 2025 19:45
@ganfra ganfra requested a review from a team as a code owner May 22, 2025 19:45
@ganfra ganfra requested review from bmarty and removed request for a team May 22, 2025 19:45
Copy link
Contributor

github-actions bot commented May 22, 2025

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/jLwwB6

Copy link

codecov bot commented May 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.43%. Comparing base (4572419) to head (091d41b).
Report is 3 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4765      +/-   ##
===========================================
+ Coverage    80.40%   80.43%   +0.02%     
===========================================
  Files         2143     2143              
  Lines        56766    56769       +3     
  Branches      7119     7120       +1     
===========================================
+ Hits         45644    45660      +16     
+ Misses        8685     8672      -13     
  Partials      2437     2437              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

ensureAllEventsConsumed()
}
rustBaseRoom.destroy()
}
Copy link
Member

Choose a reason for hiding this comment

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

Maybe create a private fun to avoid all the code duplication for those 3 tests?

@ganfra ganfra enabled auto-merge May 27, 2025 20:08
Copy link

@ganfra ganfra merged commit 4441a25 into develop May 27, 2025
29 checks passed
@ganfra ganfra deleted the feature/fga/fix_left_room_membership_change branch May 27, 2025 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR-Bugfix For bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants