diff --git a/src/store/conversationsStore.js b/src/store/conversationsStore.js index f7a968c7627..80dfd4bf571 100644 --- a/src/store/conversationsStore.js +++ b/src/store/conversationsStore.js @@ -634,9 +634,8 @@ const actions = { return } - await setConversationUnread(token) - commit('updateUnreadMessages', { token, unreadMessages: 1 }) - await dispatch('fetchConversation', { token }) + const response = await setConversationUnread(token) + await dispatch('addConversation', response.data.ocs.data) }, async updateLastCommonReadMessage({ commit, getters }, { token, lastCommonReadMessage }) { diff --git a/src/store/messagesStore.js b/src/store/messagesStore.js index 0807a008324..4020f150551 100644 --- a/src/store/messagesStore.js +++ b/src/store/messagesStore.js @@ -823,7 +823,7 @@ const actions = { */ async clearLastReadMessage(context, { token, updateVisually = false }) { const conversation = context.getters.conversations[token] - if (!conversation || !conversation.lastMessage) { + if (!conversation/* FIXME || !conversation.lastMessage*/) { return } // set the id to the last message