diff --git a/src/components/MessagesList/MessagesList.vue b/src/components/MessagesList/MessagesList.vue index b655782f7ef..646f343b061 100644 --- a/src/components/MessagesList/MessagesList.vue +++ b/src/components/MessagesList/MessagesList.vue @@ -729,6 +729,12 @@ export default { if (Axios.isCancel(exception)) { console.debug('The request has been canceled', exception) } + + if (exception?.response?.status === 304 && exception?.response?.data === '') { + // 304 - Not modified + // Empty chat, no messages to load + this.$store.dispatch('loadedMessagesOfConversation', { token: this.token }) + } } this.loadingOldMessages = false }, diff --git a/src/store/messagesStore.js b/src/store/messagesStore.js index a150bac93e0..79022d8716d 100644 --- a/src/store/messagesStore.js +++ b/src/store/messagesStore.js @@ -1410,6 +1410,10 @@ const actions = { async easeMessageList(context, { token }) { context.commit('easeMessageList', { token }) }, + + loadedMessagesOfConversation(context, { token }) { + context.commit('loadedMessagesOfConversation', { token }) + } } export default { state, mutations, getters, actions }