Repository navigation
Conversation
Leaving a chat sometimes did not take effect: the signaling websocket kept receiving messages for the room and no push notifications arrived. ChatViewModel.leaveRoom() resets the capabilities state to GetCapabilitiesStartState once the leave request completes. Any later conversation emission (since 61ba4e8 also lastCommonReadMessage changes, e.g. from the room list sync of the conversation list) then emits GetCapabilitiesInitialLoadState. ChatActivity is still STARTED after onPause until onStop arrives, which can take a while after finish(), so its observer called joinRoomWithPassword() and joined the room again right after leaving it. With the Home button the value was delivered in onStart instead, and if nothing emitted in the background the room was not joined again at all on return. Only join the room while the chat is resumed: a join requested between onPause and onResume is deferred until onResume, and a left room is always joined again on the next resume. Also skip a second REST join while one is already running. Assisted-by: Claude-Code:claude-opus-5-5
ChatViewModel.onPause disposed a join request that was still running. The request may already have reached the server, which then kept a session in the room that the app never knew about: onPause saw no valid session and did not leave, so the server only dropped it on timeout. Keep the join request running across onPause instead. If the chat is left while it runs, the room is left again via REST as soon as the join completes, without reporting the join to the activity (so no websocket join is sent). The leave runs in appScope, so it is also sent after the chat was closed with Back. Resuming the chat before the join completes cancels the pending leave and the join is reported as usual. The running join is tracked in ChatViewModel instead of ChatActivity, so it also survives a configuration change and no second join is started. Assisted-by: Claude-Code:claude-opus-5-5
Collaborator
Author
|
oh that was coincidence.. It will take a closer look on monday. So i might close my PR in favor of #6909 |
Contributor
馃摫 QA build
The QA build installs alongside a released Nextcloud app, so you can keep Downloading the file requires a GitHub account, so open this link on the |
Collaborator
Author
|
closing in favor of #6909 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
not yet tested!
Symptom
Cause 1: rejoin right after leaving (fixed in f9461f957)
Fix 1
Cause 2: cancelled join (fixed in 3c76ebf6e)
Fix 2
Not changed
How to test
馃弫 Checklist
/backport to stable-xx.x馃 AI (if applicable)