From 1a08e6e5d50cda75e9e2f01dc46a225e6f7c118d Mon Sep 17 00:00:00 2001 From: supertiger1234 Date: Fri, 31 May 2019 19:36:57 +0100 Subject: [PATCH] fixed notification bug --- src/components/app/relationships/RecentFriends.vue | 1 + src/store/modules/messageModule.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/app/relationships/RecentFriends.vue b/src/components/app/relationships/RecentFriends.vue index 0794022..7cad449 100644 --- a/src/components/app/relationships/RecentFriends.vue +++ b/src/components/app/relationships/RecentFriends.vue @@ -51,6 +51,7 @@ export default { // gets unopened dms const notificationsFiltered = notifications.filter(item => { + if (json[item.channelID] && json[item.channelID].server_id) return; const find = result.find(resFind => { return resFind.channelID === item.channelID }) diff --git a/src/store/modules/messageModule.js b/src/store/modules/messageModule.js index 385a737..e6ad869 100644 --- a/src/store/modules/messageModule.js +++ b/src/store/modules/messageModule.js @@ -34,7 +34,7 @@ const actions = { const channels = context.rootState.channelModule.channels; channelID = Object.keys(channels).find(_channelID => { - return channels[_channelID].recipients[0].uniqueID === uniqueID + return channels[_channelID].recipients && channels[_channelID].recipients.length && channels[_channelID].recipients[0].uniqueID === uniqueID }) const messages = context.state.messages[channelID]; const channel = channels[channelID];