Fix race condition which often prevented sending group call started message #5001
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.
First time contributor checklist:
Contributor checklist:
development
branchyarn ready
run passes successfully (more about tests here)Description
The group call update message after starting a group call is currently only
sent in the
onLocalDeviceStateChanged
callback. But often the peekInfo isnot available yet when the connection state changes to Joined, effectively
preventing the group call update message to be sent.
This commit also sends the message in the
onPeekChanged
callback. It is stillonly sent at most once, which is ensured by the updateMessageState check.
I'm not sure if ringrtc is behaving correctly here or if the peek info should always be available if the connection state is Joined.
Then this PR would be just a workaround for an underlying problem in ringrtc ...
Fixes #4915
Manually tested with Signal-Desktop on Linux (x86_64) and the Android app.