[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 <djorkaeff.unb@gmail.com>
Co-authored-by: Diego Mello <diegolmello@gmail.com>
This commit is contained in:
Prateek Jain 2020-04-30 23:40:19 +05:30 committed by GitHub
parent c4a749c2e5
commit a52056988e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -573,9 +573,9 @@ const RocketChat = {
).fetch(); ).fetch();
if (filterUsers && !filterRooms) { if (filterUsers && !filterRooms) {
data = data.filter(item => item.t === 'd'); data = data.filter(item => item.t === 'd' && !RocketChat.isGroupChat(item));
} else if (!filterUsers && filterRooms) { } 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); data = data.slice(0, 7);