From ac861a058c50367fcc3bd8c225a5f84431199e3e Mon Sep 17 00:00:00 2001 From: Ali <> Date: Fri, 20 Aug 2021 21:29:53 +0200 Subject: [PATCH 1/3] Update API and tgcalls --- submodules/TelegramApi/Sources/Api0.swift | 1 + submodules/TelegramApi/Sources/Api2.swift | 12 ++++++++++++ .../Sources/State/PeerInputActivity.swift | 4 +++- .../Sources/OngoingCallThreadLocalContext.mm | 2 +- submodules/TgVoipWebrtc/tgcalls | 2 +- 5 files changed, 18 insertions(+), 3 deletions(-) diff --git a/submodules/TelegramApi/Sources/Api0.swift b/submodules/TelegramApi/Sources/Api0.swift index d72f1d2ef9..bd58cc6040 100644 --- a/submodules/TelegramApi/Sources/Api0.swift +++ b/submodules/TelegramApi/Sources/Api0.swift @@ -181,6 +181,7 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[608050278] = { return Api.SendMessageAction.parse_sendMessageUploadRoundAction($0) } dict[-651419003] = { return Api.SendMessageAction.parse_speakingInGroupCallAction($0) } dict[-606432698] = { return Api.SendMessageAction.parse_sendMessageHistoryImportAction($0) } + dict[-1336228175] = { return Api.SendMessageAction.parse_sendMessageChooseStickerAction($0) } dict[-1137792208] = { return Api.PrivacyKey.parse_privacyKeyStatusTimestamp($0) } dict[1343122938] = { return Api.PrivacyKey.parse_privacyKeyChatInvite($0) } dict[1030105979] = { return Api.PrivacyKey.parse_privacyKeyPhoneCall($0) } diff --git a/submodules/TelegramApi/Sources/Api2.swift b/submodules/TelegramApi/Sources/Api2.swift index 7bbea07397..e7082870e7 100644 --- a/submodules/TelegramApi/Sources/Api2.swift +++ b/submodules/TelegramApi/Sources/Api2.swift @@ -4281,6 +4281,7 @@ public extension Api { case sendMessageUploadRoundAction(progress: Int32) case speakingInGroupCallAction case sendMessageHistoryImportAction(progress: Int32) + case sendMessageChooseStickerAction public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { switch self { @@ -4373,6 +4374,12 @@ public extension Api { buffer.appendInt32(-606432698) } serializeInt32(progress, buffer: buffer, boxed: false) + break + case .sendMessageChooseStickerAction: + if boxed { + buffer.appendInt32(-1336228175) + } + break } } @@ -4409,6 +4416,8 @@ public extension Api { return ("speakingInGroupCallAction", []) case .sendMessageHistoryImportAction(let progress): return ("sendMessageHistoryImportAction", [("progress", progress)]) + case .sendMessageChooseStickerAction: + return ("sendMessageChooseStickerAction", []) } } @@ -4505,6 +4514,9 @@ public extension Api { return nil } } + public static func parse_sendMessageChooseStickerAction(_ reader: BufferReader) -> SendMessageAction? { + return Api.SendMessageAction.sendMessageChooseStickerAction + } } public enum PrivacyKey: TypeConstructorDescription { diff --git a/submodules/TelegramCore/Sources/State/PeerInputActivity.swift b/submodules/TelegramCore/Sources/State/PeerInputActivity.swift index 611ee31e27..78e86bb106 100644 --- a/submodules/TelegramCore/Sources/State/PeerInputActivity.swift +++ b/submodules/TelegramCore/Sources/State/PeerInputActivity.swift @@ -63,8 +63,10 @@ extension PeerInputActivity { self = .uploadingInstantVideo(progress: progress) case .speakingInGroupCallAction: self = .speakingInGroupCall(timestamp: timestamp) - case let .sendMessageHistoryImportAction: + case .sendMessageHistoryImportAction: return nil + case .sendMessageChooseStickerAction: + return nil } } } diff --git a/submodules/TgVoipWebrtc/Sources/OngoingCallThreadLocalContext.mm b/submodules/TgVoipWebrtc/Sources/OngoingCallThreadLocalContext.mm index 16e0703b8f..1f413bafe6 100644 --- a/submodules/TgVoipWebrtc/Sources/OngoingCallThreadLocalContext.mm +++ b/submodules/TgVoipWebrtc/Sources/OngoingCallThreadLocalContext.mm @@ -577,7 +577,7 @@ tgcalls::VideoCaptureInterfaceObject *GetVideoCaptureAssumingSameThread(tgcalls: if (_keepLandscape) { resolvedId += std::string(":landscape"); } - _interface->switchToDevice(resolvedId); + _interface->switchToDevice(resolvedId, false); } - (void)setIsVideoEnabled:(bool)isVideoEnabled { diff --git a/submodules/TgVoipWebrtc/tgcalls b/submodules/TgVoipWebrtc/tgcalls index a984927307..7dd794ce7b 160000 --- a/submodules/TgVoipWebrtc/tgcalls +++ b/submodules/TgVoipWebrtc/tgcalls @@ -1 +1 @@ -Subproject commit a9849273072b31182390a9f4f15777d510ce662a +Subproject commit 7dd794ce7b166386807243fd52a70efe48d87739 From 93a8542046b7b78d5311998e47fc62b3cec8ca96 Mon Sep 17 00:00:00 2001 From: Ali <> Date: Sun, 22 Aug 2021 01:10:26 +0200 Subject: [PATCH 2/3] Update tgcalls --- submodules/TgVoipWebrtc/tgcalls | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/TgVoipWebrtc/tgcalls b/submodules/TgVoipWebrtc/tgcalls index 7dd794ce7b..741aea35ed 160000 --- a/submodules/TgVoipWebrtc/tgcalls +++ b/submodules/TgVoipWebrtc/tgcalls @@ -1 +1 @@ -Subproject commit 7dd794ce7b166386807243fd52a70efe48d87739 +Subproject commit 741aea35ed0bd95ccf02dc9f70d5b913a1ee43d0 From 01d708ef4df87b408f33382e1a69f2da9433b4a7 Mon Sep 17 00:00:00 2001 From: Ali <> Date: Sun, 22 Aug 2021 01:45:28 +0200 Subject: [PATCH 3/3] Update tgcalls --- submodules/TgVoipWebrtc/tgcalls | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/TgVoipWebrtc/tgcalls b/submodules/TgVoipWebrtc/tgcalls index 741aea35ed..6b986a40a3 160000 --- a/submodules/TgVoipWebrtc/tgcalls +++ b/submodules/TgVoipWebrtc/tgcalls @@ -1 +1 @@ -Subproject commit 741aea35ed0bd95ccf02dc9f70d5b913a1ee43d0 +Subproject commit 6b986a40a333502288db5bcb9e1af7dfa042dcc9