diff --git a/submodules/TelegramVoip/Sources/OngoingCallContext.swift b/submodules/TelegramVoip/Sources/OngoingCallContext.swift index 09872ede43..45423635a7 100644 --- a/submodules/TelegramVoip/Sources/OngoingCallContext.swift +++ b/submodules/TelegramVoip/Sources/OngoingCallContext.swift @@ -784,7 +784,7 @@ public final class OngoingCallContext { var allowP2P = allowP2P if debugUseLegacyVersionForReflectors { useModernImplementation = true - version = "4.0.3" + version = "4.1.2" allowP2P = false } else { useModernImplementation = version != OngoingCallThreadLocalContext.version() @@ -830,27 +830,25 @@ public final class OngoingCallContext { filteredConnections.append(contentsOf: callConnectionDescriptionsWebrtc(connection, idMapping: reflectorIdMapping)) } - if debugUseLegacyVersionForReflectors { - for connection in filteredConnections { - if connection.username == "reflector" { - let peerTag = dataWithHexString(connection.password) - if #available(iOS 12.0, *) { - strongSelf.signalingConnectionManager = QueueLocalObject(queue: queue, generate: { - return CallSignalingConnectionManager(queue: queue, peerTag: peerTag, servers: [OngoingCallConnectionDescriptionWebrtc(reflectorId: 0, hasStun: false, hasTurn: true, hasTcp: true, ip: "91.108.12.1", port: 533, username: "reflector", password: connection.password)], dataReceived: { data in - guard let strongSelf = self else { - return + for connection in filteredConnections { + if connection.username == "reflector" { + let peerTag = dataWithHexString(connection.password) + if #available(iOS 12.0, *) { + strongSelf.signalingConnectionManager = QueueLocalObject(queue: queue, generate: { + return CallSignalingConnectionManager(queue: queue, peerTag: peerTag, servers: [OngoingCallConnectionDescriptionWebrtc(reflectorId: 0, hasStun: false, hasTurn: true, hasTcp: true, ip: "91.108.12.1", port: 533, username: "reflector", password: connection.password)], dataReceived: { data in + guard let strongSelf = self else { + return + } + strongSelf.withContext { context in + if let context = context as? OngoingCallThreadLocalContextWebrtc { + context.addSignaling(data) } - strongSelf.withContext { context in - if let context = context as? OngoingCallThreadLocalContextWebrtc { - context.addSignaling(data) - } - } - }) + } }) - } - - break + }) } + + break } } diff --git a/submodules/TgVoipWebrtc/BUILD b/submodules/TgVoipWebrtc/BUILD index 348fe3d4d6..b019c63148 100644 --- a/submodules/TgVoipWebrtc/BUILD +++ b/submodules/TgVoipWebrtc/BUILD @@ -96,6 +96,9 @@ objc_library( "GLKit", "AVFoundation", ], + sdk_dylibs = [ + "libz", + ], visibility = [ "//visibility:public", ], diff --git a/submodules/TgVoipWebrtc/tgcalls b/submodules/TgVoipWebrtc/tgcalls index 0ecfbd22fd..f3c148739b 160000 --- a/submodules/TgVoipWebrtc/tgcalls +++ b/submodules/TgVoipWebrtc/tgcalls @@ -1 +1 @@ -Subproject commit 0ecfbd22fdc764d341a50236e6c1546884bafa3c +Subproject commit f3c148739bf0ad37a0882a7fcafcbc56969c4f8a