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

Wait for a room with joined state in /sync after creating it #3421

Merged

Conversation

jmartinesp
Copy link
Member

@jmartinesp jmartinesp commented Sep 6, 2024

Content

Rename RustMatrixClient.awaitRoom to RustMatrixClient.awaitJoinedRoom and make it actually wait on receiving the expected room with a joined membership state.

Motivation and context

Fixes (or workarounds) #3183 . iOS seems to have their own counterpart.

Tests

Create several rooms one after another. None of them should display the room preview screen that was incorrectly displayed before, as the received room still didn't have the right membership state.

Tested devices

  • Physical
  • Emulator
  • OS version(s): 14

Checklist

  • Changes have been tested on an Android device or Android emulator with API 23
  • 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
  • Pull request includes a sign off
  • You've made a self review of your PR

@jmartinesp jmartinesp added the PR-Bugfix For bug fix label Sep 6, 2024
Copy link
Contributor

github-actions bot commented Sep 6, 2024

📱 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/u2W7QC

Copy link

sonarqubecloud bot commented Sep 6, 2024

Copy link

codecov bot commented Sep 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.65%. Comparing base (b802a19) to head (e6740a1).
Report is 27 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #3421   +/-   ##
========================================
  Coverage    82.65%   82.65%           
========================================
  Files         1705     1705           
  Lines        40072    40072           
  Branches      4875     4875           
========================================
  Hits         33123    33123           
  Misses        5231     5231           
  Partials      1718     1718           

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

@manuroe
Copy link
Member

manuroe commented Sep 6, 2024

This patch works like a charm.
I created 5 rooms in a row. Every time, it went as expected. Thanks @jmartinesp !

@jmartinesp jmartinesp marked this pull request as ready for review September 6, 2024 15:15
@jmartinesp jmartinesp requested a review from a team as a code owner September 6, 2024 15:15
@jmartinesp jmartinesp requested review from ganfra and removed request for a team September 6, 2024 15:15
@jmartinesp jmartinesp added the Run-Maestro Starts a Maestro Cloud session to run integration tests label Sep 6, 2024
@github-actions github-actions bot removed the Run-Maestro Starts a Maestro Cloud session to run integration tests label Sep 6, 2024
Copy link
Member

@ganfra ganfra left a comment

Choose a reason for hiding this comment

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

Makes sense, but would be great to have something to wait for a room or subscribe to room membership in the rust sdk!

@jmartinesp jmartinesp merged commit 8c015da into develop Sep 9, 2024
33 checks passed
@jmartinesp jmartinesp deleted the fix/jme/3183-wait-for-joined-room-after-creating-one branch September 9, 2024 07:36
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.

3 participants