mirror of
https://github.com/Qortal/chrome-extension.git
synced 2025-02-11 17:55:49 +00:00
fix issue with re-encrypt notification
This commit is contained in:
parent
2c17ddc35d
commit
5bfedd119e
@ -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} />
|
||||
)}
|
||||
|
@ -1039,7 +1039,7 @@ export const Group = ({
|
||||
return false;
|
||||
const isDiffMemberNumber =
|
||||
memberCountFromSecretKeyData !== members?.memberCount &&
|
||||
newEncryptionNotification?.text?.data?.numberOfMembers !==
|
||||
newEncryptionNotification?.decryptedData?.data?.numberOfMembers !==
|
||||
members?.memberCount;
|
||||
|
||||
if (isDiffMemberNumber) return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user