From b482d4d8127d064aab0bea6437c0d98ee33c4a11 Mon Sep 17 00:00:00 2001 From: Evgeny Date: Thu, 27 Feb 2025 07:38:40 +0000 Subject: [PATCH] core: fix search in chat (#5677) --- src/Simplex/Chat/Store/Messages.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Simplex/Chat/Store/Messages.hs b/src/Simplex/Chat/Store/Messages.hs index 22a3aadd34..1902fd002e 100644 --- a/src/Simplex/Chat/Store/Messages.hs +++ b/src/Simplex/Chat/Store/Messages.hs @@ -1260,7 +1260,7 @@ getGroupChatItemIDs db User {userId} GroupInfo {groupId} contentFilter range cou (orParams ts itemId) " ORDER BY item_ts DESC, chat_item_id DESC " where - orCond c1 c2 = " (" <> c <> " AND " <> c1 <> ") OR (" <> c <> " AND " <> c2 <> ") " + orCond c1 c2 = " ((" <> c <> " AND " <> c1 <> ") OR (" <> c <> " AND " <> c2 <> ")) " orParams ts itemId = (p :. (Only ts) :. p :. (ts, itemId)) rangeQuery :: ToRow p => Query -> p -> Query -> IO [ChatItemId] rangeQuery c p ob