From 03c2c016d1639a66918c1997a04542ce05db0f83 Mon Sep 17 00:00:00 2001 From: DorraJaouad Date: Thu, 28 Nov 2024 15:11:46 +0100 Subject: [PATCH] fixup! fix(frontend): Make frontend compatible with absence of lastMessage --- src/composables/useConversationInfo.js | 2 +- src/store/messagesStore.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/composables/useConversationInfo.js b/src/composables/useConversationInfo.js index f94280ce429..e5365af1cf1 100644 --- a/src/composables/useConversationInfo.js +++ b/src/composables/useConversationInfo.js @@ -43,7 +43,7 @@ export function useConversationInfo({ }) const hasLastMessage = computed(() => { - return !!item.value?.lastMessage && !!Object.keys(Object(item.value?.lastMessage)).length + return item.value?.lastMessage }) /** diff --git a/src/store/messagesStore.js b/src/store/messagesStore.js index cab1ff5b18b..b4b34c8c344 100644 --- a/src/store/messagesStore.js +++ b/src/store/messagesStore.js @@ -151,7 +151,7 @@ const getters = { return false } - return getters.getLastKnownMessageId(token) < conversation.lastMessage.id + return getters.getLastKnownMessageId(token) < conversation.lastMessage?.id }, isMessagesListPopulated: (state) => (token) => {