Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixup! Provide federation values when joining a room in the external …
…signaling

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
  • Loading branch information
danxuliu authored and backportbot[bot] committed Sep 13, 2024
commit 2663ecabed151f23bd03545b5e4956cfed1d03d1
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down
10 changes: 7 additions & 3 deletions app/src/main/java/com/nextcloud/talk/webrtc/WebSocketInstance.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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 {
Expand Down