From a3e0a7be58b2b125f2a30ba21e381e4c9ea34aed Mon Sep 17 00:00:00 2001 From: Reinaldo Neto <47038980+reinaldonetof@users.noreply.github.com> Date: Tue, 27 Sep 2022 15:08:44 -0300 Subject: [PATCH] Regression: Local search is returning wrong object (#4567) --- app/lib/methods/search.ts | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/app/lib/methods/search.ts b/app/lib/methods/search.ts index 7d144c933..538d10440 100644 --- a/app/lib/methods/search.ts +++ b/app/lib/methods/search.ts @@ -27,18 +27,15 @@ export const localSearch = async ({ text = '', filterUsers = true, filterRooms = } const search = subscriptions.slice(0, 7).map(item => ({ - avatarETag: item.avatarETag, + _id: item._id, rid: item.rid, name: item.name, - t: item.t, fname: item.fname, + avatarETag: item.avatarETag, + t: item.t, encrypted: item.encrypted, lastMessage: item.lastMessage, - _id: item._id, - status: item.status, - username: item.usernames, - outside: false, - search: true + status: item.status })) as ISearchLocal[]; return search;