Shorten searchConversations SQL query
This commit is contained in:
parent
eb203ba929
commit
6bbcf86772
1 changed files with 4 additions and 6 deletions
|
@ -2391,16 +2391,14 @@ async function searchConversations(
|
||||||
const rows = await db.all(
|
const rows = await db.all(
|
||||||
`SELECT json FROM conversations WHERE
|
`SELECT json FROM conversations WHERE
|
||||||
(
|
(
|
||||||
e164 LIKE $e164 OR
|
e164 LIKE $query OR
|
||||||
name LIKE $name OR
|
name LIKE $query OR
|
||||||
profileFullName LIKE $profileFullName
|
profileFullName LIKE $query
|
||||||
)
|
)
|
||||||
ORDER BY active_at DESC
|
ORDER BY active_at DESC
|
||||||
LIMIT $limit`,
|
LIMIT $limit`,
|
||||||
{
|
{
|
||||||
$e164: `%${query}%`,
|
$query: `%${query}%`,
|
||||||
$name: `%${query}%`,
|
|
||||||
$profileFullName: `%${query}%`,
|
|
||||||
$limit: limit || 100,
|
$limit: limit || 100,
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue