Repository navigation
fix(call): do not leave the call when rejoining alone in it - #6951
ToteMeiSter wants to merge 1 commit into
Conversation
When the publisher connection fails or the signaling session is renewed, the call is left and joined again. If the caller is alone in the call (nobody has answered yet), leaving it makes the server end the call: the ringing of the callee stops, the callee gets a missed call, and the next join starts a new call with a new notification. Remember whether somebody else was in the call and skip the leave request on a rejoin until then. After somebody else was in the call, join silently, so a call restarted by the rejoin does not ring again. Signed-off-by: Krainov Gleb <krajnov.g@kontentplus.ru> Assisted-by: Claude Code:claude-sonnet-5-5
|
Thanks for contributing, we will have a closer look soon |
|
@ToteMeiSter are you fine if i take over this PR? In general: Is it okay for you if we just add commits for PRs and maybe take PRs over? |
|
@mahibi Yes, of course, please feel free to take over this PR. In general, you are also very welcome to add commits to my PRs or take them over. Before pushing any further changes to branches you have taken over, I will first ask whether you are happy for me to resume work on them. It would also be helpful to know where we could discuss proposed changes in advance, including rough edges I would like to address and features I would like to implement. Is there a preferred place for these discussions? |
Alright thanks to let us know. To discuss bigger changes or features, please add your thoughts to existing issues or create new ones. It makes sense to first discuss and only then begin with pull requests. Otherwise there is the risk of spending too much time in something that wont be merged, e.g. if it needs to be aligned with the other platforms and we have to choose different ways of implementing it etc. |
rapterjet2004
left a comment
There was a problem hiding this comment.
LGTM, thanks. The guard covers both rejoin paths (direct hangupNetworkCalls(shutDownView=false) and via hangup(false,false)), while leaving the screen and end-for-all still send the leave, and otherParticipantWasInCall is only ever set, never reset.
Not blocking, just a cross-PR note: the two rejoin paths treat ApplicationWideCurrentRoomHolder.isInCall differently (hangup() sets it false, the direct path keeps it true), which is pre-existing. It only matters because #6953 filters call pushes on isInCall, so a push during a hangup()-path rejoin could briefly slip through. Narrow and already racy — worth keeping in mind when both land.
When the publisher connection fails or the signaling session is renewed, the client leaves the call and joins it again. If the caller is alone in the call (the callee has not answered yet), the leave request makes the server end the call: the callee's ringing stops, the callee gets a missed call, and the next join starts a new call with a new notification.
Changes in
CallActivity:otherParticipantWasInCallis set when another session is in the call (handleCallParticipantsChanged). A rejoin does not reset it.shouldLeaveCallOnHangup(...): on a rejoin (RECONNECTING/PUBLISHER_FAILED, the screen stays open) the leave request is skipped until somebody else was in the call. Leaving the screen and "end call for everyone" always send it.isJoinSilent(...): after somebody else was in the call, the join is silent, so a call that the server restarted is not rung again.Known trade-off: on a rejoin alone, the old session is not left explicitly; the server drops it after the session timeout.
Fixes #6950
🖼️ Screenshots
🚧 TODO
🏁 Checklist
/backport to stable-xx.xTests:
CallActivityRejoinAloneTest, 4 JVM tests of the pure functions. Without the fix the rejoin-alone test fails.🤖 AI (if applicable)
Trailers of the commit:
🤖 Generated with Claude Code