Message box Permission

pull/1073/head
TeamAbronDev 2025-01-16 18:30:56 +03:30
parent 6325994611
commit 0a67ab3e5f
1 changed files with 21 additions and 19 deletions

View File

@ -257,25 +257,27 @@ export default observer(({ channel }: Props) => {
</Base>
);
}
console.log(channel)
if (!channel.havePermission("SendMessage") && channel.recipient?.relationship == "Blocked" || channel.recipient?.relationship == "BlockedOther"){
return (
<Base>
<Blocked>
<Action>
<PermissionTooltip
permission="SendMessages"
placement="top">
<ShieldX size={22} />
</PermissionTooltip>
</Action>
<div className="text">
<Text id="app.main.channel.misc.no_sending" />
</div>
</Blocked>
</Base>
);
}
console.log(channel) //|| channel.channel_type != "DirectMessage"
if (channel.channel_type != "SavedMessages")
if (!channel.havePermission("SendMessage") && channel.channel_type == "TextChannel" || channel.recipient?.relationship == "Blocked" || channel.recipient?.relationship == "BlockedOther"){
return (
<Base>
<Blocked>
<Action>
<PermissionTooltip
permission="SendMessages"
placement="top">
<ShieldX size={22} />
</PermissionTooltip>
</Action>
<div className="text">
<Text id="app.main.channel.misc.no_sending" />
</div>
</Blocked>
</Base>
);
}
// Push message content to draft.
const setMessage = useCallback(
(content?: string) => {