From 4fa93eae2213e047cf0abf1dc48d795a1e612dd7 Mon Sep 17 00:00:00 2001 From: overtake Date: Tue, 4 May 2021 20:31:12 +0300 Subject: [PATCH] fix isVideoEnabled --- submodules/TelegramCore/Sources/GroupCalls.swift | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/submodules/TelegramCore/Sources/GroupCalls.swift b/submodules/TelegramCore/Sources/GroupCalls.swift index 0ed12b5871..8cd8993402 100644 --- a/submodules/TelegramCore/Sources/GroupCalls.swift +++ b/submodules/TelegramCore/Sources/GroupCalls.swift @@ -382,19 +382,19 @@ public enum GetGroupCallParticipantsError { } public func getGroupCallParticipants(account: Account, callId: Int64, accessHash: Int64, offset: String, ssrcs: [UInt32], limit: Int32, sortAscending: Bool?) -> Signal { - let sortAscendingValue: Signal<(Bool, Int32?, Bool, GroupCallParticipantsContext.State.DefaultParticipantsAreMuted?), GetGroupCallParticipantsError> + let sortAscendingValue: Signal<(Bool, Int32?, Bool, GroupCallParticipantsContext.State.DefaultParticipantsAreMuted?, Bool), GetGroupCallParticipantsError> if let sortAscending = sortAscending { - sortAscendingValue = .single((sortAscending, nil, false, nil)) + sortAscendingValue = .single((sortAscending, nil, false, nil, false)) } else { sortAscendingValue = getCurrentGroupCall(account: account, callId: callId, accessHash: accessHash) |> mapError { _ -> GetGroupCallParticipantsError in return .generic } - |> mapToSignal { result -> Signal<(Bool, Int32?, Bool, GroupCallParticipantsContext.State.DefaultParticipantsAreMuted?), GetGroupCallParticipantsError> in + |> mapToSignal { result -> Signal<(Bool, Int32?, Bool, GroupCallParticipantsContext.State.DefaultParticipantsAreMuted?, Bool), GetGroupCallParticipantsError> in guard let result = result else { return .fail(.generic) } - return .single((result.info.sortAscending, result.info.scheduleTimestamp, result.info.subscribedToScheduled, result.info.defaultParticipantsAreMuted)) + return .single((result.info.sortAscending, result.info.scheduleTimestamp, result.info.subscribedToScheduled, result.info.defaultParticipantsAreMuted, result.info.isVideoEnabled)) } } @@ -412,7 +412,8 @@ public func getGroupCallParticipants(account: Account, callId: Int64, accessHash let version: Int32 let nextParticipantsFetchOffset: String? - let (sortAscendingValue, scheduleTimestamp, subscribedToScheduled, defaultParticipantsAreMuted) = sortAscendingAndScheduleTimestamp + let (sortAscendingValue, scheduleTimestamp, subscribedToScheduled, defaultParticipantsAreMuted, isVideoEnabled) = sortAscendingAndScheduleTimestamp + switch result { case let .groupParticipants(count, participants, nextOffset, chats, users, apiVersion): @@ -510,7 +511,7 @@ public func getGroupCallParticipants(account: Account, callId: Int64, accessHash scheduleTimestamp: scheduleTimestamp, subscribedToScheduled: subscribedToScheduled, totalCount: totalCount, - isVideoEnabled: false, + isVideoEnabled: isVideoEnabled, version: version ) }