Merge pull request #14 from archem-team/bug/channel-permission
Message box Permissionpull/1073/head
commit
cb5aeb4144
|
|
@ -257,25 +257,27 @@ export default observer(({ channel }: Props) => {
|
||||||
</Base>
|
</Base>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
console.log(channel)
|
console.log(channel) //|| channel.channel_type != "DirectMessage"
|
||||||
if (!channel.havePermission("SendMessage") && channel.recipient?.relationship == "Blocked" || channel.recipient?.relationship == "BlockedOther"){
|
if (channel.channel_type != "SavedMessages")
|
||||||
return (
|
if (!channel.havePermission("SendMessage") && channel.channel_type == "TextChannel" || channel.recipient?.relationship == "Blocked" || channel.recipient?.relationship == "BlockedOther"){
|
||||||
<Base>
|
|
||||||
<Blocked>
|
return (
|
||||||
<Action>
|
<Base>
|
||||||
<PermissionTooltip
|
<Blocked>
|
||||||
permission="SendMessages"
|
<Action>
|
||||||
placement="top">
|
<PermissionTooltip
|
||||||
<ShieldX size={22} />
|
permission="SendMessages"
|
||||||
</PermissionTooltip>
|
placement="top">
|
||||||
</Action>
|
<ShieldX size={22} />
|
||||||
<div className="text">
|
</PermissionTooltip>
|
||||||
<Text id="app.main.channel.misc.no_sending" />
|
</Action>
|
||||||
</div>
|
<div className="text">
|
||||||
</Blocked>
|
<Text id="app.main.channel.misc.no_sending" />
|
||||||
</Base>
|
</div>
|
||||||
);
|
</Blocked>
|
||||||
}
|
</Base>
|
||||||
|
);
|
||||||
|
}
|
||||||
// Push message content to draft.
|
// Push message content to draft.
|
||||||
const setMessage = useCallback(
|
const setMessage = useCallback(
|
||||||
(content?: string) => {
|
(content?: string) => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue