Приведение chacha_key_plain к hex для транспортировки
This commit is contained in:
@@ -5,6 +5,7 @@ import { ReplyedMessage } from "../ReplyedMessage/ReplyedMessage";
|
|||||||
import { IconX } from "@tabler/icons-react";
|
import { IconX } from "@tabler/icons-react";
|
||||||
import { useSetting } from "@/app/providers/SettingsProvider/useSetting";
|
import { useSetting } from "@/app/providers/SettingsProvider/useSetting";
|
||||||
import { modals } from "@mantine/modals";
|
import { modals } from "@mantine/modals";
|
||||||
|
import { MessageReply } from "@/app/providers/DialogProvider/useReplyMessages";
|
||||||
|
|
||||||
export function MessageReplyMessages(props: AttachmentProps) {
|
export function MessageReplyMessages(props: AttachmentProps) {
|
||||||
const colors = useRosettaColors();
|
const colors = useRosettaColors();
|
||||||
@@ -14,7 +15,7 @@ export function MessageReplyMessages(props: AttachmentProps) {
|
|||||||
('bgInReplyMessages', '');
|
('bgInReplyMessages', '');
|
||||||
const reply = JSON.parse(props.attachment.blob);
|
const reply = JSON.parse(props.attachment.blob);
|
||||||
|
|
||||||
//console.info("Mreply", reply);
|
console.info("Mreply", reply);
|
||||||
|
|
||||||
const closeAlert = () => {
|
const closeAlert = () => {
|
||||||
modals.openConfirmModal({
|
modals.openConfirmModal({
|
||||||
@@ -40,8 +41,8 @@ export function MessageReplyMessages(props: AttachmentProps) {
|
|||||||
{reply.length <= 0 &&
|
{reply.length <= 0 &&
|
||||||
<Skeleton h={50} w={'100%'}></Skeleton>
|
<Skeleton h={50} w={'100%'}></Skeleton>
|
||||||
}
|
}
|
||||||
{reply.map((msg, index) => (
|
{reply.map((msg : MessageReply, index) => (
|
||||||
<ReplyedMessage parent={props.parent} chacha_key_plain={msg.chacha_key_plain} key={index} messageReply={msg}></ReplyedMessage>
|
<ReplyedMessage parent={props.parent} chacha_key_plain={Buffer.from(msg.chacha_key_plain, 'hex').toString('utf-8')} key={index} messageReply={msg}></ReplyedMessage>
|
||||||
))}
|
))}
|
||||||
{showAlertInReplyMessages && <Alert style={{
|
{showAlertInReplyMessages && <Alert style={{
|
||||||
borderTopLeftRadius: 0,
|
borderTopLeftRadius: 0,
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ export function useReplyMessages() {
|
|||||||
*/
|
*/
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
message.chacha_key_plain = Buffer.from(message.chacha_key_plain).toString('hex');
|
||||||
replyMessages.messages.push(message);
|
replyMessages.messages.push(message);
|
||||||
const sortedByTime = replyMessages.messages.sort((a, b) => a.timestamp - b.timestamp);
|
const sortedByTime = replyMessages.messages.sort((a, b) => a.timestamp - b.timestamp);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user