mirror of
https://github.com/Qortal/Qortal-Hub.git
synced 2025-07-23 04:36:52 +00:00
fix issue with re-encrypt notification
This commit is contained in:
@@ -241,7 +241,8 @@ export const ChatGroup = ({selectedGroup, secretKey, setSecretKey, getSecretKey,
|
||||
|
||||
|
||||
useEffect(()=> {
|
||||
const notifications = messages.filter((message)=> message?.text?.type === 'notification')
|
||||
const notifications = messages.filter((message)=> message?.decryptedData
|
||||
?.type === 'notification')
|
||||
if(notifications.length === 0) return
|
||||
const latestNotification = notifications.reduce((latest, current) => {
|
||||
return current.timestamp > latest.timestamp ? current : latest;
|
||||
|
@@ -159,8 +159,8 @@ export const MessageItem = ({
|
||||
])}
|
||||
/>
|
||||
)}
|
||||
{reply?.text?.type === "notification" ? (
|
||||
<MessageDisplay htmlContent={reply.text?.data?.message} />
|
||||
{reply?.decryptedData?.type === "notification" ? (
|
||||
<MessageDisplay htmlContent={reply.decryptedData?.data?.message} />
|
||||
) : (
|
||||
<MessageDisplay isReply htmlContent={reply.text} />
|
||||
)}
|
||||
@@ -176,8 +176,8 @@ export const MessageItem = ({
|
||||
])}
|
||||
/>
|
||||
)}
|
||||
{message?.text?.type === "notification" ? (
|
||||
<MessageDisplay htmlContent={message.text?.data?.message} />
|
||||
{message?.decryptedData?.type === "notification" ? (
|
||||
<MessageDisplay htmlContent={message.decryptedData?.data?.message} />
|
||||
) : (
|
||||
<MessageDisplay htmlContent={message.text} />
|
||||
)}
|
||||
@@ -265,8 +265,8 @@ export const ReplyPreview = ({message})=> {
|
||||
])}
|
||||
/>
|
||||
)}
|
||||
{message?.text?.type === "notification" ? (
|
||||
<MessageDisplay htmlContent={message.text?.data?.message} />
|
||||
{message?.decryptedData?.type === "notification" ? (
|
||||
<MessageDisplay htmlContent={message.decryptedData?.data?.message} />
|
||||
) : (
|
||||
<MessageDisplay isReply htmlContent={message.text} />
|
||||
)}
|
||||
|
Reference in New Issue
Block a user