autocomplete: fix RoomProvider regression

pull/21833/head
Aviral Dasgupta 2017-03-07 04:08:06 +05:30
parent feac919c0a
commit 9946cadc2d
No known key found for this signature in database
GPG Key ID: 5FD1E9F4FFD3DA80
1 changed files with 2 additions and 2 deletions

View File

@ -14,7 +14,7 @@ export default class RoomProvider extends AutocompleteProvider {
constructor() { constructor() {
super(ROOM_REGEX); super(ROOM_REGEX);
this.matcher = new FuzzyMatcher([], { this.matcher = new FuzzyMatcher([], {
keys: ['name', 'aliases'], keys: ['name', 'roomId', 'aliases'],
}); });
} }
@ -26,7 +26,7 @@ export default class RoomProvider extends AutocompleteProvider {
const {command, range} = this.getCurrentCommand(query, selection, force); const {command, range} = this.getCurrentCommand(query, selection, force);
if (command) { if (command) {
// the only reason we need to do this is because Fuse only matches on properties // the only reason we need to do this is because Fuse only matches on properties
this.matcher.setObjects(client.getRooms().filter(room => !!room).map(room => { this.matcher.setObjects(client.getRooms().filter(room => !!room && !!getDisplayAliasForRoom(room)).map(room => {
return { return {
room: room, room: room,
name: room.name, name: room.name,