mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-07-17 16:51:10 +00:00
Merge branch 'master' of gitlab.com:peter-iakovlev/telegram-ios
This commit is contained in:
commit
03bb85506d
@ -386,8 +386,8 @@ public func joinGroupCall(account: Account, peerId: PeerId, joinAs: PeerId, call
|
|||||||
}
|
}
|
||||||
|
|
||||||
return account.network.request(Api.functions.channels.getParticipants(channel: inputChannel, filter: .channelParticipantsAdmins, offset: 0, limit: 100, hash: 0))
|
return account.network.request(Api.functions.channels.getParticipants(channel: inputChannel, filter: .channelParticipantsAdmins, offset: 0, limit: 100, hash: 0))
|
||||||
|> mapError { _ -> JoinGroupCallError in
|
|> `catch` { _ in
|
||||||
return .generic
|
return .single(.channelParticipantsNotModified)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|> map { admins -> (Set<PeerId>, [Api.User]) in
|
|> map { admins -> (Set<PeerId>, [Api.User]) in
|
||||||
@ -1387,7 +1387,12 @@ public final class GroupCallParticipantsContext {
|
|||||||
|
|
||||||
for participant in self.stateValue.state.participants {
|
for participant in self.stateValue.state.participants {
|
||||||
if participant.peer.id == peerId {
|
if participant.peer.id == peerId {
|
||||||
if participant.muteState == muteState && participant.volume == volume {
|
var raiseHandEqual: Bool = true
|
||||||
|
if let raiseHand = raiseHand {
|
||||||
|
raiseHandEqual = (participant.raiseHandRating == nil && !raiseHand) ||
|
||||||
|
(participant.raiseHandRating != nil && raiseHand)
|
||||||
|
}
|
||||||
|
if participant.muteState == muteState && participant.volume == volume && raiseHandEqual {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1830,7 +1835,7 @@ private func mergeAndSortParticipants(current currentParticipants: [GroupCallPar
|
|||||||
public func getAudioBroadcastPart(account: Account, callId: Int64, accessHash: Int64, datacenterId: Int?, timestampId: Int32) -> Signal<Data?, NoError> {
|
public func getAudioBroadcastPart(account: Account, callId: Int64, accessHash: Int64, datacenterId: Int?, timestampId: Int32) -> Signal<Data?, NoError> {
|
||||||
return account.network.multiplexedRequestManager.request(to: .main(account.network.datacenterId), consumerId: Int64.random(in: 0 ..< Int64.max), data: Api.functions.upload.getFile(flags: 0, location: .inputGroupCallStream(call: .inputGroupCall(id: callId, accessHash: accessHash), date: timestampId), offset: 0, limit: 128 * 1024), tag: nil, continueInBackground: false, automaticFloodWait: false)
|
return account.network.multiplexedRequestManager.request(to: .main(account.network.datacenterId), consumerId: Int64.random(in: 0 ..< Int64.max), data: Api.functions.upload.getFile(flags: 0, location: .inputGroupCallStream(call: .inputGroupCall(id: callId, accessHash: accessHash), date: timestampId), offset: 0, limit: 128 * 1024), tag: nil, continueInBackground: false, automaticFloodWait: false)
|
||||||
|> map(Optional.init)
|
|> map(Optional.init)
|
||||||
|> `catch` { _ -> Signal<Api.upload.File?, NoError> in
|
|> `catch` { error -> Signal<Api.upload.File?, NoError> in
|
||||||
return .single(nil)
|
return .single(nil)
|
||||||
}
|
}
|
||||||
|> map { result -> Data? in
|
|> map { result -> Data? in
|
||||||
|
Loading…
x
Reference in New Issue
Block a user