From 2f293adad53f83f8ece11114c9102fe992bd5c3a Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Wed, 19 Jul 2017 18:21:26 +0100 Subject: [PATCH] Fix userId undefined in pillifyLinks --- src/components/views/messages/TextualBody.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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] === '#' ?