From 18a0394d3b98958f68c872a5db17679297111bef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Calvi=C3=B1o=20S=C3=A1nchez?= Date: Fri, 13 Sep 2024 12:52:19 +0200 Subject: [PATCH] fixup! Provide federation values when joining a room in the external signaling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Daniel Calviño Sánchez --- .../java/com/nextcloud/talk/activities/CallActivity.kt | 5 +++-- .../com/nextcloud/talk/webrtc/WebSocketInstance.kt | 10 +++++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/com/nextcloud/talk/activities/CallActivity.kt b/app/src/main/java/com/nextcloud/talk/activities/CallActivity.kt index 0f3db1b27..706a635e2 100644 --- a/app/src/main/java/com/nextcloud/talk/activities/CallActivity.kt +++ b/app/src/main/java/com/nextcloud/talk/activities/CallActivity.kt @@ -1632,8 +1632,9 @@ class CallActivity : CallBaseActivity() { private fun callOrJoinRoomViaWebSocket() { if (hasExternalSignalingServer) { - webSocketClient!!.joinRoomWithRoomTokenAndSession(roomToken!!, callSession, - externalSignalingServer!!.federation) + webSocketClient!!.joinRoomWithRoomTokenAndSession( + roomToken!!, callSession, externalSignalingServer!!.federation + ) } else { performCall() } diff --git a/app/src/main/java/com/nextcloud/talk/webrtc/WebSocketInstance.kt b/app/src/main/java/com/nextcloud/talk/webrtc/WebSocketInstance.kt index 98138b873..fc5feb6ba 100644 --- a/app/src/main/java/com/nextcloud/talk/webrtc/WebSocketInstance.kt +++ b/app/src/main/java/com/nextcloud/talk/webrtc/WebSocketInstance.kt @@ -369,8 +369,11 @@ class WebSocketInstance internal constructor( return hasMCU } - fun joinRoomWithRoomTokenAndSession(roomToken: String, normalBackendSession: String?, - federation: FederationSettings? = null) { + fun joinRoomWithRoomTokenAndSession( + roomToken: String, + normalBackendSession: String?, + federation: FederationSettings? = null + ) { Log.d(TAG, "joinRoomWithRoomTokenAndSession") Log.d(TAG, " roomToken: $roomToken") Log.d(TAG, " session: $normalBackendSession") @@ -384,7 +387,8 @@ class WebSocketInstance internal constructor( currentFederation = null sendMessage(message) } else if (roomToken == currentRoomToken && normalBackendSession == currentNormalBackendSession && - federation == currentFederation) { + federation?.roomId == currentFederation?.roomId && federation?.nextcloudServer == federation?.nextcloudServer + ) { Log.d(TAG, "roomToken & session are unchanged. Joining locally without to send websocket message") sendRoomJoinedEvent() } else {