Show correct membership messages for ban/unban.
This commit is contained in:
parent
91943d8a45
commit
d4a98b3850
1 changed files with 8 additions and 1 deletions
|
@ -36,11 +36,18 @@ module.exports = React.createClass({
|
||||||
switch (ev.getContent().membership) {
|
switch (ev.getContent().membership) {
|
||||||
case 'invite':
|
case 'invite':
|
||||||
return senderName + " invited " + targetName + ".";
|
return senderName + " invited " + targetName + ".";
|
||||||
|
case 'ban':
|
||||||
|
return senderName + " banned " + targetName + ".";
|
||||||
case 'join':
|
case 'join':
|
||||||
return targetName + " joined the room.";
|
return targetName + " joined the room.";
|
||||||
case 'leave':
|
case 'leave':
|
||||||
|
if (ev.getSender() === ev.getStateKey()) {
|
||||||
return targetName + " left the room.";
|
return targetName + " left the room.";
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
return senderName + " unbanned " + targetName + ".";
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
render: function() {
|
render: function() {
|
||||||
|
|
Loading…
Reference in a new issue