mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
Fix minor issue in searchMessages
This commit is contained in:
@@ -1762,6 +1762,11 @@ async function searchMessages({
|
||||
.map(token => `"${token.replace(/"/g, '""')}"*`)
|
||||
.join(' ');
|
||||
|
||||
// FTS5 is not happy about empty "MATCH" so short-circuit early.
|
||||
if (!normalizedQuery) {
|
||||
return [];
|
||||
}
|
||||
|
||||
// sqlite queries with a join on a virtual table (like FTS5) are de-optimized
|
||||
// and can't use indices for ordering results. Instead an in-memory index of
|
||||
// the join rows is sorted on the fly, and this becomes substantially
|
||||
|
||||
Reference in New Issue
Block a user