dm non friend

This commit is contained in:
TeamAbronDev
2025-01-02 15:53:33 +03:30
parent 6742ea390b
commit e954c31eba
2 changed files with 5 additions and 5 deletions

4
.env
View File

@@ -1,2 +1,2 @@
VITE_API_URL=https://peptide.chat/api # VITE_API_URL=https://peptide.chat/api
# VITE_API_URL=http://local.revolt.chat:8000 VITE_API_URL=http://local.revolt.chat:8000

View File

@@ -45,6 +45,7 @@ import AutoComplete, { useAutoComplete } from "../AutoComplete";
import { PermissionTooltip } from "../Tooltip"; import { PermissionTooltip } from "../Tooltip";
import FilePreview from "./bars/FilePreview"; import FilePreview from "./bars/FilePreview";
import ReplyBar from "./bars/ReplyBar"; import ReplyBar from "./bars/ReplyBar";
import { User } from "@styled-icons/boxicons-regular";
type Props = { type Props = {
channel: Channel; channel: Channel;
@@ -256,8 +257,8 @@ export default observer(({ channel }: Props) => {
</Base> </Base>
); );
} }
console.log(channel)
if (!channel.havePermission("SendMessage")) { if (!channel.havePermission("SendMessage") && channel.recipient?.relationship == "Blocked" || channel.recipient?.relationship == "BlockedOther"){
return ( return (
<Base> <Base>
<Blocked> <Blocked>
@@ -275,7 +276,6 @@ export default observer(({ channel }: Props) => {
</Base> </Base>
); );
} }
// Push message content to draft. // Push message content to draft.
const setMessage = useCallback( const setMessage = useCallback(
(content?: string) => { (content?: string) => {