diff --git a/src/components/Chat/ChatGroup.tsx b/src/components/Chat/ChatGroup.tsx
index 44446cf..a8dff49 100644
--- a/src/components/Chat/ChatGroup.tsx
+++ b/src/components/Chat/ChatGroup.tsx
@@ -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;
diff --git a/src/components/Chat/MessageItem.tsx b/src/components/Chat/MessageItem.tsx
index 7df771c..bfaf5cc 100644
--- a/src/components/Chat/MessageItem.tsx
+++ b/src/components/Chat/MessageItem.tsx
@@ -159,8 +159,8 @@ export const MessageItem = ({
])}
/>
)}
- {reply?.text?.type === "notification" ? (
-
+ {reply?.decryptedData?.type === "notification" ? (
+
) : (
)}
@@ -176,8 +176,8 @@ export const MessageItem = ({
])}
/>
)}
- {message?.text?.type === "notification" ? (
-
+ {message?.decryptedData?.type === "notification" ? (
+
) : (
)}
@@ -265,8 +265,8 @@ export const ReplyPreview = ({message})=> {
])}
/>
)}
- {message?.text?.type === "notification" ? (
-
+ {message?.decryptedData?.type === "notification" ? (
+
) : (
)}
diff --git a/src/components/Group/Group.tsx b/src/components/Group/Group.tsx
index 814fe86..338b0e8 100644
--- a/src/components/Group/Group.tsx
+++ b/src/components/Group/Group.tsx
@@ -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;