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 new logins with Simplified SS using the proxy #3417

Merged

Conversation

jmartinesp
Copy link
Member

Content

Setup whether to use the proxy or native sliding sync at an earlier stage when signing in, so the SlidingSyncVersion is properly populated, stored and later restored.

Motivation and context

With the current code, Simplified Sliding Sync was never used even if it was enabled in developer options.

Tests

  • Enable SSS.
  • Check the logs and ensure the /sync requests hit the right endpoint (_matrix/client/unstable/org.matrix.simplified_msc3575/sync instead of _matrix/client/unstable/org.matrix.msc3575/sync).
  • Disable SSS.
  • Check again the endpoint for the /sync requests.

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
@jmartinesp jmartinesp requested a review from a team as a code owner September 6, 2024 13:55
@jmartinesp jmartinesp requested review from ganfra and removed request for a team September 6, 2024 13:55
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/Epe2Ff

Copy link

codecov bot commented Sep 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.61%. Comparing base (4b4acfc) to head (ae3f555).
Report is 44 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #3417   +/-   ##
========================================
  Coverage    82.61%   82.61%           
========================================
  Files         1694     1694           
  Lines        39685    39685           
  Branches      4831     4831           
========================================
  Hits         32787    32787           
  Misses        5205     5205           
  Partials      1693     1693           

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

val slidingSync = when {
AuthenticationConfig.SLIDING_SYNC_PROXY_URL != null -> ClientBuilderSlidingSync.CustomProxy(AuthenticationConfig.SLIDING_SYNC_PROXY_URL!!)
appPreferencesStore.isSimplifiedSlidingSyncEnabledFlow().first() -> ClientBuilderSlidingSync.Simplified
restore -> ClientBuilderSlidingSync.Restored
Copy link
Member

Choose a reason for hiding this comment

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

Should we not checked first if restore is true?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ooops, true.

Copy link
Member Author

Choose a reason for hiding this comment

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

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.

Thanks for the fix, I've not tested but looks ok!

Copy link

sonarcloud bot commented Sep 6, 2024

@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
@jmartinesp jmartinesp enabled auto-merge (squash) September 6, 2024 14:48
@jmartinesp jmartinesp merged commit 0ec19ec into develop Sep 6, 2024
27 checks passed
@jmartinesp jmartinesp deleted the fix/jme/session-restoration-using-proxy-instead-of-sss branch September 6, 2024 15:09
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