зеркало из https://github.com/nextcloud/talk-ios.git
Simplify completion block of getSignalingSettings
Signed-off-by: Marcel Müller <marcel-mueller@gmx.de>
This commit is contained in:
Родитель
e778aa48ea
Коммит
28e2cd151a
|
@ -235,11 +235,7 @@ import Foundation
|
|||
}
|
||||
|
||||
return apiSessionManager.getOcs(urlString, account: account, parameters: parameters) { ocs, error in
|
||||
if let dataDict = ocs?.dataDict {
|
||||
completionBlock(SignalingSettings(dictionary: dataDict), nil)
|
||||
} else {
|
||||
completionBlock(nil, error)
|
||||
}
|
||||
completionBlock(SignalingSettings(dictionary: ocs?.dataDict), error)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -15,7 +15,9 @@ import Foundation
|
|||
public var turnServers: [TurnServer] = []
|
||||
public var federation: [String: Any]?
|
||||
|
||||
init(dictionary: [String: Any]) {
|
||||
init?(dictionary: [String: Any]?) {
|
||||
guard let dictionary else { return nil }
|
||||
|
||||
super.init()
|
||||
|
||||
self.server = dictionary["server"] as? String
|
||||
|
|
|
@ -25,7 +25,7 @@ import Foundation
|
|||
}
|
||||
|
||||
if let turnCredential = dictionary["credential"] as? String {
|
||||
self.credential = turnCredential
|
||||
credential = turnCredential
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче