Call debugging

This commit is contained in:
Isaac 2024-04-26 19:17:38 +04:00
parent d26544fec2
commit d2fac5fc3f

View File

@ -958,9 +958,20 @@ public final class OngoingCallContext {
directConnection = nil
}
#if DEBUG
//var customParameters = customParameters
//customParameters["v9_reflector_shortcircuit"] = true as NSNumber
#if DEBUG && false
var customParameters = customParameters
if let initialCustomParameters = try? JSONSerialization.jsonObject(with: (customParameters ?? "{}").data(using: .utf8)!) as? [String: Any] {
var customParametersValue: [String: Any]
customParametersValue = initialCustomParameters
customParametersValue["network_standalone_reflectors"] = true as NSNumber
customParametersValue["network_use_mtproto"] = true as NSNumber
customParametersValue["network_skip_initial_ping"] = true as NSNumber
customParameters = String(data: try! JSONSerialization.data(withJSONObject: customParametersValue), encoding: .utf8)!
if let reflector = filteredConnections.first(where: { $0.username == "reflector" && $0.reflectorId == 1 }) {
filteredConnections = [reflector]
}
}
#endif
let context = OngoingCallThreadLocalContextWebrtc(