mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
Channel Ownership Tranfser: support for new errors
This commit is contained in:
parent
f805672310
commit
9561227540
1 changed files with 6 additions and 0 deletions
|
|
@ -14,6 +14,8 @@ public enum ChannelOwnershipTransferError {
|
|||
case authSessionTooFresh(Int32)
|
||||
case requestPassword
|
||||
case invalidPassword
|
||||
case adminsTooMuch
|
||||
case userPublicChannelsTooMuch
|
||||
case restricted
|
||||
case userBlocked
|
||||
}
|
||||
|
|
@ -74,6 +76,10 @@ public func updateChannelOwnership(postbox: Postbox, network: Network, accountSt
|
|||
if let value = Int32(timeout) {
|
||||
return .authSessionTooFresh(value)
|
||||
}
|
||||
} else if error.errorDescription == "CHANNELS_ADMIN_PUBLIC_TOO_MUCH" {
|
||||
return .userPublicChannelsTooMuch
|
||||
} else if error.errorDescription == "ADMINS_TOO_MUCH" {
|
||||
return .adminsTooMuch
|
||||
} else if error.errorDescription == "USER_PRIVACY_RESTRICTED" {
|
||||
return .restricted
|
||||
} else if error.errorDescription == "USER_BLOCKED" {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue