-
Notifications
You must be signed in to change notification settings - Fork 160
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
Ensure sessionPath is not reused for different homeserver. Fixes not loading media issue. #3299
Conversation
📱 Scan the QR code below to install the build (arm64 only) for this PR. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #3299 +/- ##
========================================
Coverage 82.56% 82.56%
========================================
Files 1662 1662
Lines 38992 38992
Branches 4724 4724
========================================
Hits 32193 32193
Misses 5133 5133
Partials 1666 1666 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
@@ -117,8 +126,9 @@ class RustMatrixAuthenticationService @Inject constructor( | |||
|
|||
override suspend fun setHomeserver(homeserver: String): Result<Unit> = | |||
withContext(coroutineDispatchers.io) { | |||
val emptySessionPath = rotateSessionPath() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe newSessionPath
?
Quality Gate passedIssues Measures |
Content
Ensure the folder
sessionPath
is not reused for different homeserver, else some cached data may be wrong.Rotate the folder and delete the previous one. One side effect is described in #3296 because API to get authentication media may or may not be available and this capability is stored in cache.
Motivation and context
Closes #3296
Screenshots / GIFs
NA
Tests
Before: media cannot be loaded
After: media can be loaded.
Tested devices
Checklist