mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-30 09:21:28 +00:00
Merge branch 'master' of https://gitlab.com/peter-iakovlev/telegramcore
This commit is contained in:
commit
406326c555
@ -80,7 +80,14 @@ public func updatePeers(transaction: Transaction, peers: [Peer], update: (Peer?,
|
|||||||
}
|
}
|
||||||
case Namespaces.Peer.SecretChat:
|
case Namespaces.Peer.SecretChat:
|
||||||
if let secretChat = updated as? TelegramSecretChat {
|
if let secretChat = updated as? TelegramSecretChat {
|
||||||
updatePeerChatInclusionWithMinTimestamp(transaction: transaction, id: peerId, minTimestamp: secretChat.creationDate, forceRootGroupIfNotExists: true)
|
let isActive: Bool
|
||||||
|
switch secretChat.embeddedState {
|
||||||
|
case .active, .handshake:
|
||||||
|
isActive = true
|
||||||
|
case .terminated:
|
||||||
|
isActive = false
|
||||||
|
}
|
||||||
|
updatePeerChatInclusionWithMinTimestamp(transaction: transaction, id: peerId, minTimestamp: secretChat.creationDate, forceRootGroupIfNotExists: isActive)
|
||||||
} else {
|
} else {
|
||||||
assertionFailure()
|
assertionFailure()
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user