Skip to content

Commit

Permalink
filterAndSortContacts should tokenize
Browse files Browse the repository at this point in the history
  • Loading branch information
indutny-signal committed Mar 29, 2021
1 parent 05ea4a4 commit 6f7ecb1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ts/test-both/state/selectors/conversations_test.ts
Expand Up @@ -551,7 +551,8 @@ describe('both/state/selectors/conversations', () => {
const result = getComposeContacts(state);

const ids = result.map(contact => contact.id);
assert.deepEqual(ids, ['convo-1', 'convo-5']);
// NOTE: convo-6 matches because you can't write "Sharing" without "in"
assert.deepEqual(ids, ['convo-1', 'convo-5', 'convo-6']);
});
});

Expand Down
1 change: 1 addition & 0 deletions ts/util/filterAndSortContacts.ts
Expand Up @@ -9,6 +9,7 @@ const FUSE_OPTIONS: FuseOptions<ConversationType> = {
// A small-but-nonzero threshold lets us match parts of E164s better, and makes the
// search a little more forgiving.
threshold: 0.05,
tokenize: true,
keys: [
{
name: 'title',
Expand Down

0 comments on commit 6f7ecb1

Please sign in to comment.