mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 21:24:59 +08:00
retain pre-stripped text so it can be used for rendering
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
54bccd2016
commit
7cdc91856b
@ -45,7 +45,7 @@ export default class RoomProvider extends AutocompleteProvider {
|
|||||||
constructor() {
|
constructor() {
|
||||||
super(ROOM_REGEX);
|
super(ROOM_REGEX);
|
||||||
this.matcher = new FuzzyMatcher([], {
|
this.matcher = new FuzzyMatcher([], {
|
||||||
keys: ['displayedAlias', 'name'],
|
keys: ['displayedAlias', '_name'],
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -69,6 +69,7 @@ export default class RoomProvider extends AutocompleteProvider {
|
|||||||
return {
|
return {
|
||||||
room: room,
|
room: room,
|
||||||
name: room.name,
|
name: room.name,
|
||||||
|
_name: stripDiacritics(room.name),
|
||||||
displayedAlias: getDisplayAliasForRoom(room),
|
displayedAlias: getDisplayAliasForRoom(room),
|
||||||
};
|
};
|
||||||
}));
|
}));
|
||||||
|
@ -40,11 +40,11 @@ export default class UserProvider extends AutocompleteProvider {
|
|||||||
|
|
||||||
constructor(room: Room) {
|
constructor(room: Room) {
|
||||||
super(USER_REGEX, {
|
super(USER_REGEX, {
|
||||||
keys: ['name'],
|
keys: ['_name'],
|
||||||
});
|
});
|
||||||
this.room = room;
|
this.room = room;
|
||||||
this.matcher = new FuzzyMatcher([], {
|
this.matcher = new FuzzyMatcher([], {
|
||||||
keys: ['name', 'userId'],
|
keys: ['_name', 'userId'],
|
||||||
shouldMatchPrefix: true,
|
shouldMatchPrefix: true,
|
||||||
shouldMatchWordsOnly: false,
|
shouldMatchWordsOnly: false,
|
||||||
});
|
});
|
||||||
@ -149,7 +149,8 @@ export default class UserProvider extends AutocompleteProvider {
|
|||||||
if (userId === currentUserId) return; // skip self
|
if (userId === currentUserId) return; // skip self
|
||||||
this.users.push({
|
this.users.push({
|
||||||
userId,
|
userId,
|
||||||
name: stripDiacritics(name),
|
name,
|
||||||
|
_name: stripDiacritics(name),
|
||||||
...rest,
|
...rest,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user