diff --git a/src/components/views/messages/TextualBody.js b/src/components/views/messages/TextualBody.js index b5ac45c1c7..85cc85be49 100644 --- a/src/components/views/messages/TextualBody.js +++ b/src/components/views/messages/TextualBody.js @@ -186,13 +186,15 @@ module.exports = React.createClass({ let roomId; let room; let member; + let userId; switch (resourceType) { case "user": roomId = this.props.mxEvent.getRoomId(); room = MatrixClientPeg.get().getRoom(roomId); - member = room.getMember(resourceId) || - new RoomMember(null, resourceId); - avatar = ; + userId = resourceId; + member = room.getMember(userId) || + new RoomMember(null, userId); + avatar = ; break; case "room": room = resourceId[0] === '#' ?