diff --git a/src/components/views/rooms/RoomSettings.js b/src/components/views/rooms/RoomSettings.js
index e6d3bc7d71..8739254966 100644
--- a/src/components/views/rooms/RoomSettings.js
+++ b/src/components/views/rooms/RoomSettings.js
@@ -63,6 +63,7 @@ const BannedUser = React.createClass({
propTypes: {
canUnban: React.PropTypes.bool,
member: React.PropTypes.object.isRequired, // js-sdk RoomMember
+ by: React.PropTypes.string.isRequired,
reason: React.PropTypes.string,
},
@@ -101,8 +102,10 @@ const BannedUser = React.createClass({
return (
{ unbanButton }
- {this.props.member.name} {this.props.member.userId}
- {this.props.reason ? " " +_t('Reason') + ": " + this.props.reason : ""}
+
+ {this.props.member.name} {this.props.member.userId}
+ {this.props.reason ? " " +_t('Reason') + ": " + this.props.reason : ""}
+
);
},
@@ -709,8 +712,11 @@ module.exports = React.createClass({
{banned.map(function(member) {
const banEvent = member.events.member.getContent();
+ const sender = self.props.room.getMember(member.events.member.getSender());
+ let bannedBy = member.events.member.getSender(); // start by falling back to mxid
+ if (sender) bannedBy = sender.name;
return (
-
+
);
})}
diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json
index e7fb18d3e9..e542253641 100644
--- a/src/i18n/strings/en_EN.json
+++ b/src/i18n/strings/en_EN.json
@@ -801,6 +801,7 @@
"This will allow you to reset your password and receive notifications.": "This will allow you to reset your password and receive notifications.",
"To return to your account in future you need to set a password": "To return to your account in future you need to set a password",
"Skip": "Skip",
+ "Banned by %(displayName)s": "Banned by %(displayName)s",
"Start verification": "Start verification",
"Share without verifying": "Share without verifying",
"Ignore request": "Ignore request",
diff --git a/src/i18n/strings/en_US.json b/src/i18n/strings/en_US.json
index 96d7cd4a88..31d1dcf3ef 100644
--- a/src/i18n/strings/en_US.json
+++ b/src/i18n/strings/en_US.json
@@ -600,6 +600,7 @@
"Desktop specific": "Desktop specific",
"Analytics": "Analytics",
"Opt out of analytics": "Opt out of analytics",
+ "Banned by %(displayName)s": "Banned by %(displayName)s",
"Options": "Options",
"Riot collects anonymous analytics to allow us to improve the application.": "Riot collects anonymous analytics to allow us to improve the application.",
"Passphrases must match": "Passphrases must match",