Get a member object, not the user object

This commit is contained in:
David Baker 2017-02-17 16:14:51 +00:00
parent a3aea6ba2d
commit 1f5fdf7945

View File

@ -143,7 +143,7 @@ module.exports = React.createClass({
} else if (kicked || banned) {
const verb = kicked ? 'kicked' : 'banned';
const roomName = this._roomNameElement('this room');
const kicker = MatrixClientPeg.get().getUser(
const kicker = this.props.room.currentState.getMember(
myMember.events.member.getSender()
);
let reason;
@ -157,7 +157,7 @@ module.exports = React.createClass({
joinBlock = (
<div>
<div className="mx_RoomPreviewBar_join_text">
You have been {verb} from {roomName} by {kicker.displayName}.<br />
You have been {verb} from {roomName} by {kicker.name}.<br />
{reason}
{rejoinBlock}
<a onClick={ this.props.onForgetClick }><b>Forget</b></a>