Only match users by matchgin displayname or user ID prefixes
Because tab completing "k" probably shouldn't give you "luke" Fixes https://github.com/vector-im/riot-web/issues/4495
This commit is contained in:
parent
2e95f5871c
commit
6a80875c01
2 changed files with 10 additions and 3 deletions
|
@ -37,10 +37,11 @@ export default class UserProvider extends AutocompleteProvider {
|
|||
|
||||
constructor() {
|
||||
super(USER_REGEX, {
|
||||
keys: ['name', 'userId'],
|
||||
keys: ['name'],
|
||||
});
|
||||
this.matcher = new FuzzyMatcher([], {
|
||||
keys: ['name', 'userId'],
|
||||
keys: ['name'],
|
||||
shouldMatchPrefix: true,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue