From ed13fd8134f3815f524f3cee64781eb5580a7329 Mon Sep 17 00:00:00 2001 From: Ali <> Date: Wed, 12 Apr 2023 22:06:24 +0400 Subject: [PATCH] Use 9.0.0 as a marker for the direct connection experiment --- .../Sources/OngoingCallContext.swift | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/submodules/TelegramVoip/Sources/OngoingCallContext.swift b/submodules/TelegramVoip/Sources/OngoingCallContext.swift index 92a1e664d1..bb60b75c2b 100644 --- a/submodules/TelegramVoip/Sources/OngoingCallContext.swift +++ b/submodules/TelegramVoip/Sources/OngoingCallContext.swift @@ -934,18 +934,18 @@ public final class OngoingCallContext { } var directConnection: OngoingCallDirectConnection? - #if DEBUG - if #available(iOS 12.0, *) { - for connection in filteredConnections { - if connection.username == "reflector" && connection.reflectorId == 1 && !connection.hasTcp && connection.hasTurn { - directConnection = CallDirectConnectionImpl(host: connection.ip, port: Int(connection.port), peerTag: dataWithHexString(connection.password)) - break + if version == "9.0.0" { + if #available(iOS 12.0, *) { + for connection in filteredConnections { + if connection.username == "reflector" && connection.reflectorId == 1 && !connection.hasTcp && connection.hasTurn { + directConnection = CallDirectConnectionImpl(host: connection.ip, port: Int(connection.port), peerTag: dataWithHexString(connection.password)) + break + } } } + } else { + directConnection = nil } - #else - directConnection = nil - #endif let context = OngoingCallThreadLocalContextWebrtc( version: version,