Display group member profile (avatar/displayname) in ConfirmUserActionDialog

Fixes https://github.com/vector-im/riot-web/issues/5486
This commit is contained in:
Luke Barnard 2017-11-09 12:24:20 +00:00
parent be5e67245b
commit 6eeb91ee2e
2 changed files with 5 additions and 3 deletions

View file

@ -104,10 +104,11 @@ export default React.createClass({
name = this.props.member.name;
userId = this.props.member.userId;
} else {
// we don't get this info from the API yet
avatar = <BaseAvatar name={this.props.groupMember.userId} width={48} height={48} />;
name = this.props.groupMember.userId;
const httpAvatarUrl = this.props.groupMember.avatarUrl ?
this.props.matrixClient.mxcUrlToHttp(this.props.groupMember.avatarUrl, 48, 48) : null;
name = this.props.groupMember.displayname || this.props.groupMember.userId;
userId = this.props.groupMember.userId;
avatar = <BaseAvatar name={name} url={httpAvatarUrl} width={48} height={48} />;
}
return (