diff --git a/submodules/TelegramApi/Sources/Api4.swift b/submodules/TelegramApi/Sources/Api4.swift index deaf0be59b..3821b90956 100644 --- a/submodules/TelegramApi/Sources/Api4.swift +++ b/submodules/TelegramApi/Sources/Api4.swift @@ -8010,11 +8010,12 @@ public extension Api { }) } - public static func getGroupCall(call: Api.InputGroupCall) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + public static func getGroupCall(call: Api.InputGroupCall, limit: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { let buffer = Buffer() - buffer.appendInt32(209498135) + buffer.appendInt32(68699611) call.serialize(buffer, true) - return (FunctionDescription(name: "phone.getGroupCall", parameters: [("call", call)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.phone.GroupCall? in + serializeInt32(limit, buffer: buffer, boxed: false) + return (FunctionDescription(name: "phone.getGroupCall", parameters: [("call", call), ("limit", limit)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.phone.GroupCall? in let reader = BufferReader(buffer) var result: Api.phone.GroupCall? if let signature = reader.readInt32() { diff --git a/submodules/TelegramCore/Sources/GroupCalls.swift b/submodules/TelegramCore/Sources/GroupCalls.swift index 031898f2c7..d60bcedf95 100644 --- a/submodules/TelegramCore/Sources/GroupCalls.swift +++ b/submodules/TelegramCore/Sources/GroupCalls.swift @@ -81,7 +81,7 @@ public enum GetCurrentGroupCallError { } public func getCurrentGroupCall(account: Account, callId: Int64, accessHash: Int64, peerId: PeerId? = nil) -> Signal { - return account.network.request(Api.functions.phone.getGroupCall(call: .inputGroupCall(id: callId, accessHash: accessHash))) + return account.network.request(Api.functions.phone.getGroupCall(call: .inputGroupCall(id: callId, accessHash: accessHash), limit: 3)) |> mapError { _ -> GetCurrentGroupCallError in return .generic } @@ -2364,7 +2364,7 @@ public final class AudioBroadcastDataSource { } public func getAudioBroadcastDataSource(account: Account, callId: Int64, accessHash: Int64) -> Signal { - return account.network.request(Api.functions.phone.getGroupCall(call: .inputGroupCall(id: callId, accessHash: accessHash))) + return account.network.request(Api.functions.phone.getGroupCall(call: .inputGroupCall(id: callId, accessHash: accessHash), limit: 3)) |> map(Optional.init) |> `catch` { _ -> Signal in return .single(nil) diff --git a/submodules/TelegramCore/Sources/Network/Network.swift b/submodules/TelegramCore/Sources/Network/Network.swift index 27a6489759..9666240384 100644 --- a/submodules/TelegramCore/Sources/Network/Network.swift +++ b/submodules/TelegramCore/Sources/Network/Network.swift @@ -506,9 +506,9 @@ func initializedNetwork(accountId: AccountRecordId, arguments: NetworkInitializa if testingEnvironment { seedAddressList = [ - 1: ["149.154.175.217"], - 2: ["149.154.167.226"], - 3: ["149.154.175.118"] + 1: ["149.154.175.10"], + 2: ["149.154.167.40"], + 3: ["149.154.175.117"] ] } else { seedAddressList = [ diff --git a/submodules/TelegramCore/Sources/State/AccountStateManagementUtils.swift b/submodules/TelegramCore/Sources/State/AccountStateManagementUtils.swift index 72dcb00b1e..db70e48c2f 100644 --- a/submodules/TelegramCore/Sources/State/AccountStateManagementUtils.swift +++ b/submodules/TelegramCore/Sources/State/AccountStateManagementUtils.swift @@ -1425,7 +1425,7 @@ private func finalStateWithUpdatesAndServerTime(postbox: Postbox, network: Netwo case let .updateDialogFilter(_, id, filter): updatedState.addUpdateChatListFilter(id: id, filter: filter) case let .updateBotCommands(peer, botId, apiCommands): - let botPeerId = PeerId(namespace: Namespaces.Peer.CloudUser, id: PeerId.Id._internalFromInt32Value(botId)) + let botPeerId = PeerId(namespace: Namespaces.Peer.CloudUser, id: PeerId.Id._internalFromInt64Value(botId)) let commands: [BotCommand] = apiCommands.map { command in switch command { case let .botCommand(command, description):