fix(communities): evaluate chatIDs changes in token permissions

This commit is contained in:
Patryk Osmaczko 2024-02-15 13:01:33 +01:00 committed by osmaczko
parent b99db4193e
commit a2b8c3d35c
1 changed files with 6 additions and 0 deletions

View File

@ -700,6 +700,12 @@ QtObject:
permissionUpdated = true permissionUpdated = true
break break
if tokenPermission.chatIds.len == prevTokenPermission.chatIds.len:
for chatID in tokenPermission.chatIds:
if not (chatID in prevTokenPermission.chatIds):
permissionUpdated = true
break
if permissionUpdated: if permissionUpdated:
self.communities[community.id].tokenPermissions[id] = tokenPermission self.communities[community.id].tokenPermissions[id] = tokenPermission
self.events.emit(SIGNAL_COMMUNITY_TOKEN_PERMISSION_UPDATED, self.events.emit(SIGNAL_COMMUNITY_TOKEN_PERMISSION_UPDATED,