diff --git a/submodules/TelegramCore/Sources/Account/Account.swift b/submodules/TelegramCore/Sources/Account/Account.swift index f0b6e79b90..f47977b01c 100644 --- a/submodules/TelegramCore/Sources/Account/Account.swift +++ b/submodules/TelegramCore/Sources/Account/Account.swift @@ -200,6 +200,16 @@ public func accountWithId(accountManager: AccountManager Signal 10 { + continue + } + if id == state.masterDatacenterId { + continue + } + guard let otherDatacenterAuthInfo = authInfo.object(forKey: idNumber) as? MTDatacenterAuthInfo else { + continue + } + guard let otherAuthKey = otherDatacenterAuthInfo.authKey else { + continue + } + additionalDatacenterKeys[id] = AccountBackupData.DatacenterKey( + id: id, + keyId: otherDatacenterAuthInfo.authKeyId, + key: otherAuthKey + ) + } + guard let authKey = datacenterAuthInfo.authKey else { return nil } @@ -817,7 +855,8 @@ public func accountBackupData(postbox: Postbox) -> Signal