From 2591ae9e8e0048abe081f01b516eee9e35de7ef7 Mon Sep 17 00:00:00 2001 From: Richard Lewis Date: Sat, 4 Jan 2020 18:01:37 +0000 Subject: [PATCH] Disable searching nicks. --- src/plugins/messageStorage/sqlite.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/messageStorage/sqlite.js b/src/plugins/messageStorage/sqlite.js index 16dc0ae4..1817e91b 100644 --- a/src/plugins/messageStorage/sqlite.js +++ b/src/plugins/messageStorage/sqlite.js @@ -208,8 +208,8 @@ class MessageStorage { } let select = - 'SELECT msg, type, time, channel FROM messages WHERE type = "message" AND network = ? AND (json_extract(msg, "$.text") LIKE ? OR json_extract(msg, "$.from") LIKE ?)'; - const params = [query.networkUuid, `%${query.searchTerm}%`, `%${query.searchTerm}%`]; + 'SELECT msg, type, time, channel FROM messages WHERE type = "message" AND network = ? AND json_extract(msg, "$.text") LIKE ?'; + const params = [query.networkUuid, `%${query.searchTerm}%`]; if (query.channelName) { select += " AND channel = ? ";