Skip to content

Commit

Permalink
[FIX] Incorrect filter on contact history search (#26813)
Browse files Browse the repository at this point in the history
Co-authored-by: Debdut Chakraborty <debdut.chakraborty@rocket.chat>
Co-authored-by: Kevin Aleman <kaleman960@gmail.com>
  • Loading branch information
3 people authored and tassoevan committed Sep 15, 2022
1 parent 71072b8 commit 7e5cbaf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/meteor/app/livechat/server/api/lib/visitors.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,13 @@ export async function searchChats({
const [total] = await LivechatRooms.findRoomsByVisitorIdAndMessageWithCriteria({
visitorId,
open: closedChatsOnly !== 'true',
served: served !== 'true',
served: served === 'true',
searchText,
onlyCount: true,
}).toArray();
const cursor = await LivechatRooms.findRoomsByVisitorIdAndMessageWithCriteria({
visitorId,
open: closedChatsOnly === 'true',
open: closedChatsOnly !== 'true',
served: served === 'true',
searchText,
options,
Expand Down

0 comments on commit 7e5cbaf

Please sign in to comment.