From a52056988e55f7e5076a6df3b2af88ab45bcb705 Mon Sep 17 00:00:00 2001 From: Prateek Jain Date: Thu, 30 Apr 2020 23:40:19 +0530 Subject: [PATCH] [FIX] MessageBox mention shouldn't show group DMs (#2049) * fixed-issue * [FIX] Filter users only if it's not a group chat Co-authored-by: Djorkaeff Alexandre Co-authored-by: Diego Mello --- app/lib/rocketchat.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/lib/rocketchat.js b/app/lib/rocketchat.js index 5333f28e3..098717d26 100644 --- a/app/lib/rocketchat.js +++ b/app/lib/rocketchat.js @@ -573,9 +573,9 @@ const RocketChat = { ).fetch(); if (filterUsers && !filterRooms) { - data = data.filter(item => item.t === 'd'); + data = data.filter(item => item.t === 'd' && !RocketChat.isGroupChat(item)); } else if (!filterUsers && filterRooms) { - data = data.filter(item => item.t !== 'd'); + data = data.filter(item => item.t !== 'd' || RocketChat.isGroupChat(item)); } data = data.slice(0, 7);