Remove community from list after being kicked/banned from it
Fixes #2517
This commit is contained in:
parent
386625209d
commit
78f7bddb36
|
@ -40,6 +40,10 @@ proc handleChatEvents(self: ChatController) =
|
||||||
self.view.reactions.push(evArgs.emojiReactions)
|
self.view.reactions.push(evArgs.emojiReactions)
|
||||||
if (evArgs.communities.len > 0):
|
if (evArgs.communities.len > 0):
|
||||||
for community in evArgs.communities:
|
for community in evArgs.communities:
|
||||||
|
if self.view.communities.isUserMemberOfCommunity(community.id) and not community.admin and not community.isMember:
|
||||||
|
discard self.view.communities.leaveCommunity(community.id)
|
||||||
|
continue
|
||||||
|
|
||||||
self.view.communities.addCommunityToList(community)
|
self.view.communities.addCommunityToList(community)
|
||||||
if (self.view.communities.activeCommunity.active and self.view.communities.activeCommunity.communityItem.id == community.id):
|
if (self.view.communities.activeCommunity.active and self.view.communities.activeCommunity.communityItem.id == community.id):
|
||||||
if (self.view.activeChannel.chatItem != nil):
|
if (self.view.activeChannel.chatItem != nil):
|
||||||
|
|
Loading…
Reference in New Issue