Fix API and clear join as cache on error

This commit is contained in:
Ali
2021-03-24 20:11:15 +04:00
parent 985ecfc013
commit 7803f5604f
5 changed files with 53 additions and 25 deletions

View File

@@ -1184,6 +1184,7 @@ public final class PresentationGroupCallImpl: PresentationGroupCall {
]), on: .root, blockInteraction: false, completion: {})
} else if case .invalidJoinAsPeer = error {
let peerId = strongSelf.peerId
let _ = clearCachedGroupCallDisplayAsAvailablePeers(account: strongSelf.accountContext.account, peerId: peerId).start()
let _ = (strongSelf.accountContext.account.postbox.transaction { transaction -> Void in
transaction.updatePeerCachedData(peerIds: Set([peerId]), update: { _, current in
if let current = current as? CachedChannelData {