update chats
This commit is contained in:
@@ -7,13 +7,14 @@ import { memo } from "react";
|
||||
|
||||
export const ChatMessageItem = memo(function ChatMessageItem({
|
||||
data,
|
||||
userPubkey,
|
||||
userPrivkey,
|
||||
}: {
|
||||
data: any;
|
||||
userPubkey: string;
|
||||
userPrivkey: string;
|
||||
}) {
|
||||
const decryptedContent = useDecryptMessage(data, userPrivkey);
|
||||
console.log(decryptedContent);
|
||||
const decryptedContent = useDecryptMessage(data, userPubkey, userPrivkey);
|
||||
// if we have decrypted content, use it instead of the encrypted content
|
||||
if (decryptedContent) {
|
||||
data["content"] = decryptedContent;
|
||||
@@ -26,7 +27,7 @@ export const ChatMessageItem = memo(function ChatMessageItem({
|
||||
<div className="flex flex-col">
|
||||
<ChatMessageUser pubkey={data.sender_pubkey} time={data.created_at} />
|
||||
<div className="-mt-[20px] pl-[49px]">
|
||||
<div className="whitespace-pre-line break-words text-base leading-tight">
|
||||
<div className="whitespace-pre-line break-words text-base text-zinc-100 leading-tight">
|
||||
{content.parsed || ""}
|
||||
</div>
|
||||
{Array.isArray(content.images) && content.images.length ? (
|
||||
|
||||
Reference in New Issue
Block a user