nextcloud / talk-ios

📱😀 Video & audio calls through Nextcloud on iOS
GNU General Public License v3.0
150 stars 92 forks source link

Fix re-joining a call #1752

Closed SystemKeeper closed 2 months ago

SystemKeeper commented 2 months ago

The problem is that we reset the currentRoom when we forceReconnect, which is fine for "normal" forced reconnects: https://github.com/nextcloud/talk-ios/blob/a09c4a02064e5de66966ea86bd6cd0e473b66ae6/NextcloudTalk/NCExternalSignalingController.m#L176-L183

In case our publisher peer fails, we want to rejoin the call, for that, we call forceReconnect on NCExternalSignalingController from NCCallController: https://github.com/nextcloud/talk-ios/blob/a09c4a02064e5de66966ea86bd6cd0e473b66ae6/NextcloudTalk/NCCallController.m#L321-L323

But for the re-join to work correctly, the NCExternalSignalingController needs to be aware, that we were in a room already: https://github.com/nextcloud/talk-ios/blob/a09c4a02064e5de66966ea86bd6cd0e473b66ae6/NextcloudTalk/NCExternalSignalingController.m#L348-L352

And this check failed since we reseted currentRoom on a forceReconnect. This results in showing the waiting message "Connecting to the call …" but nothing is ever happening.

How to test