mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 13:14:58 +08:00
Show correct membership messages for ban/unban.
This commit is contained in:
parent
91943d8a45
commit
d4a98b3850
@ -36,10 +36,17 @@ module.exports = React.createClass({
|
||||
switch (ev.getContent().membership) {
|
||||
case 'invite':
|
||||
return senderName + " invited " + targetName + ".";
|
||||
case 'ban':
|
||||
return senderName + " banned " + targetName + ".";
|
||||
case 'join':
|
||||
return targetName + " joined the room.";
|
||||
case 'leave':
|
||||
return targetName + " left the room.";
|
||||
if (ev.getSender() === ev.getStateKey()) {
|
||||
return targetName + " left the room.";
|
||||
}
|
||||
else {
|
||||
return senderName + " unbanned " + targetName + ".";
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user