From e893f994e1d64720c6c68f2250dbc7b226db8c91 Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Thu, 20 Jul 2017 15:16:25 +0100 Subject: [PATCH] Default to first room alias and then roomID --- src/components/views/rooms/MessageComposerInput.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/views/rooms/MessageComposerInput.js b/src/components/views/rooms/MessageComposerInput.js index d42f4a69bb..3165765167 100644 --- a/src/components/views/rooms/MessageComposerInput.js +++ b/src/components/views/rooms/MessageComposerInput.js @@ -43,6 +43,7 @@ import {Completion} from "../../../autocomplete/Autocompleter"; import Markdown from '../../../Markdown'; import ComposerHistoryManager from '../../../ComposerHistoryManager'; import MessageComposerStore from '../../../stores/MessageComposerStore'; +import { getDisplayAliasForRoom } from '../../../Rooms'; import {MATRIXTO_URL_PATTERN} from '../../../linkify-matrix'; const REGEX_MATRIXTO = new RegExp(MATRIXTO_URL_PATTERN); @@ -225,7 +226,7 @@ export default class MessageComposerInput extends React.Component { return r.getCanonicalAlias() === resource; }) : MatrixClientPeg.get().getRoom(resource); - linkText = room.getCanonicalAlias(); + linkText = getDisplayAliasForRoom(room) || resource; avatar = room ? : null; }