accept canonical alias for pills

pull/21833/head
Bruno Windels 2020-02-20 17:43:33 +01:00
parent 86c871f55f
commit fee9c7d21f
1 changed files with 2 additions and 1 deletions

View File

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