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