mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-08 08:31:13 +00:00
Update support account detection
This commit is contained in:
parent
779b583927
commit
e9264a570d
@ -365,7 +365,7 @@ public func sendAuthorizationCode(accountManager: AccountManager<TelegramAccount
|
||||
|
||||
let user = TelegramUser(user: user)
|
||||
var isSupportUser = false
|
||||
if let phone = user.phone, phone.hasPrefix("42") {
|
||||
if let phone = user.phone, phone.hasPrefix("42"), phone.count <= 5 {
|
||||
isSupportUser = true
|
||||
}
|
||||
let state = AuthorizedAccountState(isTestingEnvironment: account.testingEnvironment, masterDatacenterId: account.masterDatacenterId, peerId: user.id, state: nil, invalidatedChannels: [])
|
||||
|
@ -532,7 +532,7 @@ public final class SharedAccountContextImpl: SharedAccountContext {
|
||||
sortIndex = sortOrder.order
|
||||
} else if case let .backupData(backupDataValue) = attribute {
|
||||
backupData = backupDataValue.data
|
||||
} else if case .supportUserInfo = attribute {
|
||||
} else if case .supportUserInfo = attribute, !"".isEmpty {
|
||||
isSupportUser = true
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user