Default to first room alias and then roomID

pull/21833/head
Luke Barnard 2017-07-20 15:16:25 +01:00
parent 84fe51a162
commit e893f994e1
1 changed files with 2 additions and 1 deletions

View File

@ -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 ? <RoomAvatar room={room} width={16} height={16}/> : null;
}