Merge branch 'master' of gitlab.com:peter-iakovlev/telegram-ios

This commit is contained in:
Ilya Laktyushin 2020-12-28 13:54:53 +04:00
commit 9bbef19208

View File

@ -1882,9 +1882,10 @@ private func pollChannel(network: Network, peer: Peer, state: AccountMutableStat
return (network.request(Api.functions.updates.getChannelDifference(flags: 0, channel: inputChannel, filter: .channelMessagesFilterEmpty, pts: pollPts, limit: limit)) return (network.request(Api.functions.updates.getChannelDifference(flags: 0, channel: inputChannel, filter: .channelMessagesFilterEmpty, pts: pollPts, limit: limit))
|> map(Optional.init) |> map(Optional.init)
|> `catch` { error -> Signal<Api.updates.ChannelDifference?, MTRpcError> in |> `catch` { error -> Signal<Api.updates.ChannelDifference?, MTRpcError> in
if error.errorDescription == "CHANNEL_PRIVATE" { switch error.errorDescription {
case "CHANNEL_PRIVATE", "CHANNEL_INVALID":
return .single(nil) return .single(nil)
} else { default:
return .fail(error) return .fail(error)
} }
}) })