this isn't doing anything because we don't have a room when the alias is not moderated

This commit is contained in:
Bruno Windels 2020-02-21 14:06:57 +01:00
parent 2b19648786
commit fada013f9e

View File

@ -237,15 +237,7 @@ const Pill = createReactClass({
case Pill.TYPE_ROOM_MENTION: {
const room = this.state.room;
if (room) {
const isModeratedAlias = room.getCanonicalAlias() === resource ||
room.getAltAliases().includes(resource);
if (!isModeratedAlias) {
linkText = getDisplayAliasForRoom(room);
}
// if there are no moderated aliases, stick to resource
if (!linkText) {
linkText = resource;
}
linkText = resource;
if (this.props.shouldShowPillAvatar) {
avatar = <RoomAvatar room={room} width={16} height={16} aria-hidden="true" />;
}