Remove diacritics from fuse.js search term

Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com>
This commit is contained in:
automated-signal 2024-04-10 18:29:31 -05:00 committed by GitHub
parent 6abfbd286e
commit c9296a9bbc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -8,6 +8,7 @@ import { WEEK } from './durations';
import { fuseGetFnRemoveDiacritics, getCachedFuseIndex } from './fuse';
import { countConversationUnreadStats, hasUnread } from './countUnreadStats';
import { getE164 } from './getE164';
import { removeDiacritics } from './removeDiacritics';
// Fuse.js scores have order of 0.01
const ACTIVE_AT_SCORE_FACTOR = (1 / WEEK) * 0.01;
@ -116,7 +117,7 @@ function searchConversations(
});
// Escape the search term
let extendedSearchTerm = searchTerm;
let extendedSearchTerm = removeDiacritics(searchTerm);
// OR phoneNumber
if (phoneNumber) {