Get a member object, not the user object

pull/21833/head
David Baker 2017-02-17 16:14:51 +00:00
parent a3aea6ba2d
commit 1f5fdf7945
1 changed files with 2 additions and 2 deletions

View File

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