diff --git a/client/pages/d/chat.jsx b/client/pages/d/chat.jsx index aa88c2b..d5c052f 100644 --- a/client/pages/d/chat.jsx +++ b/client/pages/d/chat.jsx @@ -152,6 +152,9 @@ const RenderConversationSection = ({ unreadMessages, message }) => { }, [message, contactsRes?.data.contacts, myDid]); const renderContent = () => { + if (+message?.data.body.content !== "NaN") { + return message?.data.body.content; + } if (message?.data.type === "https://didcomm.org/webrtc/1.0/sdp") { const { signal } = message?.data.body.content; if (signal.type === "offer") { @@ -920,8 +923,8 @@ const ConversationBody = ({ activeConversation }) => { // lastly check for images over didcomm (standard is different) const msg = message.data.body.content; - if (msg === 1 || msg === "1") { - return "1"; + if (+msg !== "NaN") { + return msg; } if (isJSON(msg)) { if (JSON.parse(msg).data) { diff --git a/client/pages/d/dashboard.jsx b/client/pages/d/dashboard.jsx index 5945e7f..1f28450 100644 --- a/client/pages/d/dashboard.jsx +++ b/client/pages/d/dashboard.jsx @@ -64,6 +64,9 @@ const MessagesTable = ({ conversations, unreadMessages }) => { }; const renderContent = (lastMessage) => { + if (+lastMessage?.data.body.content !== "NaN") { + return lastMessage?.data.body.content; + } if (lastMessage?.data.type === "https://didcomm.org/webrtc/1.0/sdp") { return "Sent you an invite to connect."; } else if (lastMessage?.data.type === "file-transfer-done") {