Remove searchNicks for the time being
We should not have search implementation without a specced filter / facet setup.
This commit is contained in:
parent
de86c144b5
commit
d6a23061fc
@ -206,16 +206,9 @@ class MessageStorage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let select =
|
let select =
|
||||||
'SELECT msg, type, time, network, channel FROM messages WHERE type = "message" AND (json_extract(msg, "$.text") LIKE ?';
|
'SELECT msg, type, time, network, channel FROM messages WHERE type = "message" AND json_extract(msg, "$.text") LIKE ?';
|
||||||
const params = [`%${query.searchTerm}%`];
|
const params = [`%${query.searchTerm}%`];
|
||||||
|
|
||||||
if (query.searchNicks) {
|
|
||||||
select += ' OR json_extract(msg, "$.from.nick") LIKE ?)';
|
|
||||||
params.push(query.searchTerm);
|
|
||||||
} else {
|
|
||||||
select += ")";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (query.networkUuid) {
|
if (query.networkUuid) {
|
||||||
select += " AND network = ? ";
|
select += " AND network = ? ";
|
||||||
params.push(query.networkUuid);
|
params.push(query.networkUuid);
|
||||||
|
Loading…
Reference in New Issue
Block a user