From aaa4b4283af9446164ed95207a74866dd0f0baf0 Mon Sep 17 00:00:00 2001 From: RoyceDa Date: Sat, 28 Mar 2026 17:07:43 +0200 Subject: [PATCH] =?UTF-8?q?=D0=9D=D0=BE=D0=B2=D0=B0=D1=8F=20=D1=81=D0=B8?= =?UTF-8?q?=D1=81=D1=82=D0=B5=D0=BC=D0=B0=20=D0=BF=D0=B5=D1=80=D0=B5=D1=81?= =?UTF-8?q?=D1=8B=D0=BB=D0=BA=D0=B8=20=D1=81=D0=BE=D0=BE=D0=B1=D1=89=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B9=20=D0=B1=D0=B5=D0=B7=20=D1=82=D1=80=D0=B0?= =?UTF-8?q?=D0=BD=D1=81=D0=BB=D1=8F=D1=86=D0=B8=D0=B8=20=D0=B8=20=D1=82?= =?UTF-8?q?=D1=80=D0=B0=D0=BD=D1=81=D0=BA=D0=BE=D0=B4=D0=B8=D1=80=D0=BE?= =?UTF-8?q?=D0=B2=D0=B0=D0=BD=D0=B8=D1=8F=20=D0=B2=D0=BB=D0=BE=D0=B6=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/components/MessageAttachments/MessageReplyMessages.tsx | 2 +- app/components/Messages/Message.tsx | 7 +++++-- app/providers/DialogProvider/useDialog.ts | 2 +- app/providers/DialogProvider/useReplyMessages.ts | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/app/components/MessageAttachments/MessageReplyMessages.tsx b/app/components/MessageAttachments/MessageReplyMessages.tsx index c0027fc..6e24c96 100644 --- a/app/components/MessageAttachments/MessageReplyMessages.tsx +++ b/app/components/MessageAttachments/MessageReplyMessages.tsx @@ -41,7 +41,7 @@ export function MessageReplyMessages(props: AttachmentProps) { } {reply.map((msg, index) => ( - + ))} {showAlertInReplyMessages && a.type != AttachmentType.MESSAGES), message_id: props.message_id, - + chacha_key_plain: props.chacha_key_plain }; const avatars = useAvatars(user.publicKey); @@ -126,6 +126,9 @@ export function Message(props: MessageProps) { if (props.replyed) { return false; } + if(props.chacha_key_plain == ""){ + return false; + } if (messageReply.attachments.find((v) => ATTACHMENTS_NOT_ALLOWED_TO_REPLY.includes(v.type))) { return false; } @@ -215,7 +218,7 @@ export function Message(props: MessageProps) { fontSize: '13px', color: messageStyle == MessageStyle.BUBBLES ? (computedTheme == 'light' ? (props.parent?.from_me ? 'white' : 'black') : 'white') : (computedTheme == 'light' ? 'black' : 'white') }} ml={props.avatar_no_render ? 50 : undefined} onDoubleClick={(e) => e.stopPropagation()}> - + diff --git a/app/providers/DialogProvider/useDialog.ts b/app/providers/DialogProvider/useDialog.ts index c6aa6be..c176465 100644 --- a/app/providers/DialogProvider/useDialog.ts +++ b/app/providers/DialogProvider/useDialog.ts @@ -103,7 +103,7 @@ export function useDialog() : { content: content, timestamp: Date.now(), readed: publicKey == dialog ? 1 : 0, - chacha_key: aesChachaKey, + chacha_key: key.toString('utf-8'), from_me: 1, plain_message: message, delivered: publicKey == dialog ? DeliveredMessageState.DELIVERED : DeliveredMessageState.WAITING, diff --git a/app/providers/DialogProvider/useReplyMessages.ts b/app/providers/DialogProvider/useReplyMessages.ts index 846a64c..50c4039 100644 --- a/app/providers/DialogProvider/useReplyMessages.ts +++ b/app/providers/DialogProvider/useReplyMessages.ts @@ -19,7 +19,7 @@ export interface MessageReply { message: string; attachments: Attachment[]; message_id: string; - + chacha_key_plain: string; } export function useReplyMessages() {