chore: Do not show the user actions if the user doesn't have the necessary permissions in the channel
This commit is contained in:
parent
055d8e8322
commit
bf90d1bbc0
|
@ -924,6 +924,7 @@ Loader {
|
|||
},
|
||||
Loader {
|
||||
active: !root.isInPinnedPopup && delegate.hovered && !delegate.hideQuickActions
|
||||
&& root.rootStore.permissionsStore.viewAndPostCriteriaMet
|
||||
visible: active
|
||||
sourceComponent: StatusFlatRoundButton {
|
||||
objectName: "replyToMessageButton"
|
||||
|
@ -939,6 +940,7 @@ Loader {
|
|||
},
|
||||
Loader {
|
||||
active: !root.isInPinnedPopup && root.isText && !root.editModeOn && root.amISender && delegate.hovered && !delegate.hideQuickActions
|
||||
&& root.rootStore.permissionsStore.viewAndPostCriteriaMet
|
||||
visible: active
|
||||
sourceComponent: StatusFlatRoundButton {
|
||||
objectName: "editMessageButton"
|
||||
|
@ -963,6 +965,9 @@ Loader {
|
|||
if(delegate.hideQuickActions)
|
||||
return false;
|
||||
|
||||
if (!root.rootStore.permissionsStore.viewAndPostCriteriaMet)
|
||||
return false;
|
||||
|
||||
const chatType = root.messageStore.chatType;
|
||||
const pinMessageAllowedForMembers = root.messageStore.isPinMessageAllowedForMembers
|
||||
|
||||
|
@ -1025,6 +1030,8 @@ Loader {
|
|||
return false;
|
||||
if (delegate.hideQuickActions)
|
||||
return false;
|
||||
if (!root.rootStore.permissionsStore.viewAndPostCriteriaMet)
|
||||
return false;
|
||||
return (root.amISender || root.amIChatAdmin) &&
|
||||
(messageContentType === Constants.messageContentType.messageType ||
|
||||
messageContentType === Constants.messageContentType.stickerType ||
|
||||
|
|
Loading…
Reference in New Issue