fix(Communities): disable chat input when active user is banned

Fixes #2507
This commit is contained in:
Pascal Precht 2021-05-31 14:38:28 +02:00 committed by Iuri Matias
parent 0498613d28
commit f138f93815
1 changed files with 5 additions and 0 deletions

View File

@ -41,6 +41,11 @@ proc handleChatEvents(self: ChatController) =
if (evArgs.communities.len > 0):
for community in evArgs.communities:
self.view.communities.addCommunityToList(community)
if (self.view.communities.activeCommunity.active and self.view.communities.activeCommunity.communityItem.id == community.id):
let communityChannel = self.view.communities.activeCommunity.chats.getChannelById(self.view.activeChannel.chatItem.id)
self.view.activeChannel.chatItem.canPost = communityChannel.canPost
self.view.activeChannelChanged()
if (evArgs.communityMembershipRequests.len > 0):
self.view.communities.addMembershipRequests(evArgs.communityMembershipRequests)
if (evArgs.pinnedMessages.len > 0):