From a0c73c807f4445bf808ca16e13945a7627294c5c Mon Sep 17 00:00:00 2001 From: RoyceDa Date: Thu, 19 Feb 2026 19:46:10 +0200 Subject: [PATCH] =?UTF-8?q?=D0=A4=D0=B8=D0=BA=D1=81=20=D0=BA=D1=80=D0=B0?= =?UTF-8?q?=D1=88=D0=B0=20=D0=BF=D1=80=D0=B8=D0=BB=D0=BE=D0=B6=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8=D1=8F=20=D0=BF=D1=80=D0=B8=20=D0=BF=D0=BE=D0=BF=D1=8B?= =?UTF-8?q?=D1=82=D0=BA=D0=B5=20=D0=B2=D1=81=D1=82=D0=B0=D0=B2=D0=BA=D0=B8?= =?UTF-8?q?=20=D0=B8=20=D0=BE=D1=82=D0=B2=D0=B5=D1=82=D0=B0=20=D0=BD=D0=B0?= =?UTF-8?q?=20=D1=81=D0=BE=D0=BE=D0=B1=D1=89=D0=B5=D0=BD=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/components/DialogInput/DialogInput.tsx | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/app/components/DialogInput/DialogInput.tsx b/app/components/DialogInput/DialogInput.tsx index f1c3aef..9314207 100644 --- a/app/components/DialogInput/DialogInput.tsx +++ b/app/components/DialogInput/DialogInput.tsx @@ -104,6 +104,12 @@ export function DialogInput() { }, [dialog, editableDivRef]); useEffect(() => { + if(systemAccounts.find((acc) => acc.publicKey == dialog)){ + /** + * У системных аккаунтов нельзя отвечать на сообщения + */ + return; + } if(replyMessages.inDialogInput && replyMessages.inDialogInput == dialog){ setAttachments([{ type: AttachmentType.MESSAGES, @@ -111,7 +117,9 @@ export function DialogInput() { blob: JSON.stringify([...replyMessages.messages]), preview: "" }]); - editableDivRef.current.focus(); + if(editableDivRef.current){ + editableDivRef.current.focus(); + } } }, [dialog, replyMessages]); @@ -208,6 +216,12 @@ export function DialogInput() { } const onClickCamera = async () => { + if(systemAccounts.find((acc) => acc.publicKey == dialog)){ + /** + * У системных аккаунтов нельзя вызывать вложения + */ + return; + } if(avatars.length == 0){ return; } @@ -217,7 +231,9 @@ export function DialogInput() { type: AttachmentType.AVATAR, preview: await base64ImageToBlurhash(avatars[0].avatar) }]); - editableDivRef.current.focus(); + if(editableDivRef.current){ + editableDivRef.current.focus(); + } } const sendTypeingPacket = () => {