From fee9c7d21f533ff3f14f59ab3a7afb092e94b1b5 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Thu, 20 Feb 2020 17:43:33 +0100 Subject: [PATCH] accept canonical alias for pills --- src/components/views/elements/Pill.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/views/elements/Pill.js b/src/components/views/elements/Pill.js index 59c0bde177..cd7277cdeb 100644 --- a/src/components/views/elements/Pill.js +++ b/src/components/views/elements/Pill.js @@ -128,7 +128,8 @@ const Pill = createReactClass({ case Pill.TYPE_ROOM_MENTION: { const localRoom = resourceId[0] === '#' ? MatrixClientPeg.get().getRooms().find((r) => { - return r.getAliases().includes(resourceId); + return r.getCanonicalAlias() === resourceId || + r.getAliases().includes(resourceId); }) : MatrixClientPeg.get().getRoom(resourceId); room = localRoom; if (!localRoom) {