fixup! Provide federation values when joining a room in the external signaling

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
Daniel Calviño Sánchez 2024-09-13 12:52:19 +02:00 committed by Marcel Hibbe
parent 166107d7d2
commit 18a0394d3b
No known key found for this signature in database
GPG Key ID: C793F8B59F43CE7B
2 changed files with 10 additions and 5 deletions

View File

@ -1632,8 +1632,9 @@ class CallActivity : CallBaseActivity() {
private fun callOrJoinRoomViaWebSocket() { private fun callOrJoinRoomViaWebSocket() {
if (hasExternalSignalingServer) { if (hasExternalSignalingServer) {
webSocketClient!!.joinRoomWithRoomTokenAndSession(roomToken!!, callSession, webSocketClient!!.joinRoomWithRoomTokenAndSession(
externalSignalingServer!!.federation) roomToken!!, callSession, externalSignalingServer!!.federation
)
} else { } else {
performCall() performCall()
} }

View File

@ -369,8 +369,11 @@ class WebSocketInstance internal constructor(
return hasMCU return hasMCU
} }
fun joinRoomWithRoomTokenAndSession(roomToken: String, normalBackendSession: String?, fun joinRoomWithRoomTokenAndSession(
federation: FederationSettings? = null) { roomToken: String,
normalBackendSession: String?,
federation: FederationSettings? = null
) {
Log.d(TAG, "joinRoomWithRoomTokenAndSession") Log.d(TAG, "joinRoomWithRoomTokenAndSession")
Log.d(TAG, " roomToken: $roomToken") Log.d(TAG, " roomToken: $roomToken")
Log.d(TAG, " session: $normalBackendSession") Log.d(TAG, " session: $normalBackendSession")
@ -384,7 +387,8 @@ class WebSocketInstance internal constructor(
currentFederation = null currentFederation = null
sendMessage(message) sendMessage(message)
} else if (roomToken == currentRoomToken && normalBackendSession == currentNormalBackendSession && } 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") Log.d(TAG, "roomToken & session are unchanged. Joining locally without to send websocket message")
sendRoomJoinedEvent() sendRoomJoinedEvent()
} else { } else {