From 59ca26ee933ee18369a0606834776a3c5cd3523f Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Thu, 16 Jul 2015 17:37:35 +0100 Subject: [PATCH] Use target not sender when displaying member text. --- skins/base/views/molecules/MRoomMemberTile.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/skins/base/views/molecules/MRoomMemberTile.js b/skins/base/views/molecules/MRoomMemberTile.js index 79c8346c..92b6b119 100644 --- a/skins/base/views/molecules/MRoomMemberTile.js +++ b/skins/base/views/molecules/MRoomMemberTile.js @@ -32,13 +32,14 @@ module.exports = React.createClass({ var ev = this.props.mxEvent; // XXX: SYJS-16 var senderName = ev.sender ? ev.sender.name : "Someone"; + var targetName = ev.target ? ev.target.name : "Someone"; switch (ev.getContent().membership) { case 'invite': - return senderName + " invited " + ev.target.name + "."; + return senderName + " invited " + targetName + "."; case 'join': - return senderName + " joined the room."; + return targetName + " joined the room."; case 'leave': - return senderName + " left the room."; + return targetName + " left the room."; } }, @@ -47,7 +48,7 @@ module.exports = React.createClass({ return (
- +