forked from matrix/element-web
Bad workaround for some join events having no sender
This commit is contained in:
parent
b6319fcf50
commit
0daab63b4a
|
@ -29,13 +29,15 @@ module.exports = React.createClass({
|
||||||
|
|
||||||
getMemberEventText: function() {
|
getMemberEventText: function() {
|
||||||
var ev = this.props.mxEvent;
|
var ev = this.props.mxEvent;
|
||||||
|
// XXX: SYJS-16
|
||||||
|
var senderName = ev.sender ? ev.sender.name : "Someone";
|
||||||
switch (ev.getContent().membership) {
|
switch (ev.getContent().membership) {
|
||||||
case 'invite':
|
case 'invite':
|
||||||
return ev.sender.name + " invited " + ev.target.name + ".";
|
return senderName + " invited " + ev.target.name + ".";
|
||||||
case 'join':
|
case 'join':
|
||||||
return ev.sender.name + " joined the room.";
|
return senderName + " joined the room.";
|
||||||
case 'leave':
|
case 'leave':
|
||||||
return ev.sender.name + " left the room.";
|
return senderName + " left the room.";
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue