fix(Communities): disable chat input when active user is banned
Fixes #2507
This commit is contained in:
parent
0498613d28
commit
f138f93815
|
@ -41,6 +41,11 @@ proc handleChatEvents(self: ChatController) =
|
||||||
if (evArgs.communities.len > 0):
|
if (evArgs.communities.len > 0):
|
||||||
for community in evArgs.communities:
|
for community in evArgs.communities:
|
||||||
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):
|
||||||
|
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):
|
if (evArgs.communityMembershipRequests.len > 0):
|
||||||
self.view.communities.addMembershipRequests(evArgs.communityMembershipRequests)
|
self.view.communities.addMembershipRequests(evArgs.communityMembershipRequests)
|
||||||
if (evArgs.pinnedMessages.len > 0):
|
if (evArgs.pinnedMessages.len > 0):
|
||||||
|
|
Loading…
Reference in New Issue