also look in alt_aliases to match a pill to a room

This commit is contained in:
Bruno Windels 2020-02-21 13:00:09 +01:00
parent 16815a752b
commit f6313b51e6

View file

@ -129,7 +129,7 @@ const Pill = createReactClass({
const localRoom = resourceId[0] === '#' ? const localRoom = resourceId[0] === '#' ?
MatrixClientPeg.get().getRooms().find((r) => { MatrixClientPeg.get().getRooms().find((r) => {
return r.getCanonicalAlias() === resourceId || return r.getCanonicalAlias() === resourceId ||
r.getAliases().includes(resourceId); r.getAltAliases().includes(resourceId);
}) : MatrixClientPeg.get().getRoom(resourceId); }) : MatrixClientPeg.get().getRoom(resourceId);
room = localRoom; room = localRoom;
if (!localRoom) { if (!localRoom) {