diff --git a/website/client/components/chat/chatMessages.vue b/website/client/components/chat/chatMessages.vue index 1b906d7edf..97cfb7d3e7 100644 --- a/website/client/components/chat/chatMessages.vue +++ b/website/client/components/chat/chatMessages.vue @@ -202,8 +202,17 @@ export default { if (!profile._id) { const result = await this.$store.dispatch('members:fetchMember', { memberId }); - this.cachedProfileData[memberId] = result.data.data; - profile = result.data.data; + if (result.response && result.response.status === 404) { + return this.$store.dispatch('snackbars:add', { + title: 'Habitica', + text: this.$t('messageDeletedUser'), + type: 'error', + timeout: false, + }); + } else { + this.cachedProfileData[memberId] = result.data.data; + profile = result.data.data; + } } // Open the modal only if the data is available diff --git a/website/common/locales/en/messages.json b/website/common/locales/en/messages.json index 615cae6091..c4a95cf359 100644 --- a/website/common/locales/en/messages.json +++ b/website/common/locales/en/messages.json @@ -69,5 +69,7 @@ "notificationsRequired": "Notification ids are required.", "unallocatedStatsPoints": "You have <%= points %> unallocated Stat Points", - "beginningOfConversation": "This is the beginning of your conversation with <%= userName %>. Remember to be kind, respectful, and follow the Community Guidelines!" + "beginningOfConversation": "This is the beginning of your conversation with <%= userName %>. Remember to be kind, respectful, and follow the Community Guidelines!", + + "messageDeletedUser": "Sorry, this user has deleted their account." }