fix(Community): ensure community members with write access can post to channel

When a user is part of a community, write access to any channel of
that community is granted. When the permission allows for it, a community's
channel `canPost` property is `true`, which should be relied on to
render the necessary component for writing into a channel.

This commit makes sure community members with proper access get the
chat input rendered so they can write to channels.

Fixes #1985
This commit is contained in:
Pascal Precht 2021-03-08 13:55:56 +01:00 committed by Iuri Matias
parent d361853d0d
commit 0a7d6f6bae
1 changed files with 1 additions and 1 deletions

View File

@ -285,7 +285,7 @@ StackLayout {
if (chatsModel.activeChannel.chatType !== Constants.chatTypePrivateGroupChat && if (chatsModel.activeChannel.chatType !== Constants.chatTypePrivateGroupChat &&
(!community.active || (!community.active ||
community.access === Constants.communityChatPublicAccess || community.access === Constants.communityChatPublicAccess ||
community.admin)) { community.admin || chatsModel.activeChannel.canPost)) {
return true return true
} }
return chatsModel.activeChannel.isMember return chatsModel.activeChannel.isMember