From 8edfd60b643ac952447cb5e6ed31cee270825dd8 Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Tue, 8 Dec 2015 10:21:40 +0000 Subject: [PATCH] Actually use room.name on invites. Fixes #321 --- src/components/views/rooms/RoomTile.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/components/views/rooms/RoomTile.js b/src/components/views/rooms/RoomTile.js index b1c5ad1d85..0a03ebe89d 100644 --- a/src/components/views/rooms/RoomTile.js +++ b/src/components/views/rooms/RoomTile.js @@ -70,14 +70,9 @@ module.exports = React.createClass({ 'mx_RoomTile_invited': (me && me.membership == 'invite'), }); - var name; - if (this.props.isInvite) { - name = this.props.room.getMember(myUserId).events.member.getSender(); - } - else { - // XXX: We should never display raw room IDs, but sometimes the room name js sdk gives is undefined - name = this.props.room.name || this.props.room.roomId; - } + // XXX: We should never display raw room IDs, but sometimes the + // room name js sdk gives is undefined (cannot repro this -- k) + var name = this.props.room.name || this.props.room.roomId; name = name.replace(":", ":\u200b"); // add a zero-width space to allow linewrapping after the colon var badge;