From f138f93815fd19b7fb6415cb175c4d26b646fd63 Mon Sep 17 00:00:00 2001 From: Pascal Precht Date: Mon, 31 May 2021 14:38:28 +0200 Subject: [PATCH] fix(Communities): disable chat input when active user is banned Fixes #2507 --- src/app/chat/event_handling.nim | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/app/chat/event_handling.nim b/src/app/chat/event_handling.nim index e22593a2ac..91694f8aa8 100644 --- a/src/app/chat/event_handling.nim +++ b/src/app/chat/event_handling.nim @@ -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):