fix(@desktop/communities): Fix joining community

Unexpected exception broke handleCommunityUpdates

Fix #13958
This commit is contained in:
Michal Iskierko 2024-03-15 13:00:39 +01:00 committed by Michał Iskierko
parent 82bcddd488
commit ce4996075c
1 changed files with 8 additions and 6 deletions

View File

@ -530,12 +530,14 @@ QtObject:
let prevCommunity = self.communities[community.id]
let currOwner = community.findOwner()
let prevOwner = prevCommunity.findOwner()
if currOwner.id != prevOwner.id:
for chat in community.chats:
self.updateMemberRole(chat.id, currOwner)
try:
let currOwner = community.findOwner()
let prevOwner = prevCommunity.findOwner()
if currOwner.id != prevOwner.id:
for chat in community.chats:
self.updateMemberRole(chat.id, currOwner)
except Exception:
discard
# ownership lost
if prevCommunity.isOwner and not community.isOwner: