Skip to content

Commit

Permalink
fix(communities): evaluate chatIDs changes in token permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
osmaczko authored and jrainville committed Feb 19, 2024
1 parent 611f695 commit b18bc2d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/app_service/service/community/service.nim
Original file line number Diff line number Diff line change
Expand Up @@ -700,6 +700,12 @@ QtObject:
permissionUpdated = true
break

if tokenPermission.chatIds.len == prevTokenPermission.chatIds.len:
for chatID in tokenPermission.chatIds:
if not (chatID in prevTokenPermission.chatIds):
permissionUpdated = true
break

if permissionUpdated:
self.communities[community.id].tokenPermissions[id] = tokenPermission
self.events.emit(SIGNAL_COMMUNITY_TOKEN_PERMISSION_UPDATED,
Expand Down

0 comments on commit b18bc2d

Please sign in to comment.