Fix voice chats in legacy groups

This commit is contained in:
Ilya Laktyushin
2021-02-18 00:04:13 +04:00
parent 5096e5c84d
commit 22f9a91f97
6 changed files with 35 additions and 2 deletions

View File

@@ -522,6 +522,15 @@ public func stopGroupCall(account: Account, peerId: PeerId, callId: Int64, acces
return updated
})
}
if var peer = transaction.getPeer(peerId) as? TelegramGroup {
var flags = peer.flags
flags.remove(.hasVoiceChat)
flags.remove(.hasActiveVoiceChat)
peer = peer.updateFlags(flags: flags, version: peer.version)
updatePeers(transaction: transaction, peers: [peer], update: { _, updated in
return updated
})
}
account.stateManager.addUpdates(result)
}