зеркало из https://github.com/nextcloud/talk-ios.git
Use federation information to join ext. signaling server
Signed-off-by: Marcel Müller <marcel-mueller@gmx.de>
This commit is contained in:
Родитель
39f441b6c9
Коммит
a27c8ded4b
|
@ -162,7 +162,11 @@ import Foundation
|
|||
// Remember the latest sessionId we're using to join a room, to be able to check when joining the external signaling server
|
||||
self.joiningSessionId = sessionId
|
||||
|
||||
extSignalingController.joinRoom(token, withSessionId: sessionId) { error in
|
||||
// TODO: For non-federated rooms, we could skip getting the settings for now
|
||||
NCAPIController.sharedInstance().getSignalingSettings(for: activeAccount, forRoom: token) { signalingSettings, error in
|
||||
let federation = signalingSettings?.getFederationJoinDictionary()
|
||||
|
||||
extSignalingController.joinRoom(token, withSessionId: sessionId, withFederation: federation) { error in
|
||||
// If the sessionId is not the same anymore we tried to join with, we either already left again before
|
||||
// joining the external signaling server succeeded, or we already have another join in process
|
||||
if !self.isJoiningRoom(withToken: token) {
|
||||
|
@ -185,6 +189,7 @@ import Foundation
|
|||
completionBlock(nil, nil, error, statusCode, statusReason)
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -200,7 +205,7 @@ import Foundation
|
|||
roomController.inChat = true
|
||||
|
||||
if let extSignalingController = NCSettingsController.sharedInstance().externalSignalingController(forAccountId: activeAccount.accountId) {
|
||||
extSignalingController.joinRoom(token, withSessionId: sessionId, withCompletionBlock: nil)
|
||||
extSignalingController.joinRoom(token, withSessionId: sessionId, withFederation: nil, withCompletionBlock: nil)
|
||||
}
|
||||
} else {
|
||||
print("Could not re-join room. Status code: \(statusCode). Error: \(error?.localizedDescription ?? "Unknown")")
|
||||
|
|
Загрузка…
Ссылка в новой задаче