mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Merge branch 'master' of gitlab.com:peter-iakovlev/telegram-ios
This commit is contained in:
commit
9bbef19208
@ -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)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user