From adfc6add6f9af6b6a91748088d692510c401a2fd Mon Sep 17 00:00:00 2001 From: RoyceDa Date: Wed, 8 Apr 2026 21:55:59 +0200 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=B1=D0=B8=D1=82=D1=8B=D1=85=20?= =?UTF-8?q?=D0=B2=D0=BB=D0=BE=D0=B6=D0=B5=D0=BD=D0=B8=D0=B9=20=D0=B2=20?= =?UTF-8?q?=D0=B3=D1=80=D1=83=D0=BF=D0=BF=D0=B0=D1=85=20(=D0=BD=D0=B0=20?= =?UTF-8?q?=D0=B4=D0=B5=D0=BA=D0=BE=D0=B4=D0=B8=D0=BD=D0=B3)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/providers/DialogProvider/DialogProvider.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/providers/DialogProvider/DialogProvider.tsx b/app/providers/DialogProvider/DialogProvider.tsx index 8fcd73d..d7123ea 100644 --- a/app/providers/DialogProvider/DialogProvider.tsx +++ b/app/providers/DialogProvider/DialogProvider.tsx @@ -238,6 +238,10 @@ export function DialogProvider(props: DialogProviderProps) { * Если это групповое сообщение, то получаем ключ группы */ decryptKey = await getGroupKey(props.dialog); + /** + * Приводим к HEX так как этого требует формат расшифровки вложений в приложении + */ + decryptKey = Buffer.from(decryptKey).toString('hex'); } if(!message.from_me && !hasGroup(props.dialog)){ /** @@ -569,7 +573,7 @@ export function DialogProvider(props: DialogProviderProps) { content: content, timestamp: timestamp, readed: 0, - chacha_key: groupKey, + chacha_key: Buffer.from(groupKey).toString('hex'), from_me: 1, plain_message: decryptedContent, delivered: DeliveredMessageState.DELIVERED, @@ -723,7 +727,7 @@ export function DialogProvider(props: DialogProviderProps) { content: content, timestamp: timestamp, readed: idle ? 0 : 1, - chacha_key: groupKey, + chacha_key: Buffer.from(groupKey).toString('hex'), from_me: fromPublicKey == publicKey ? 1 : 0, plain_message: decryptedContent, delivered: DeliveredMessageState.DELIVERED,