Merge pull request #1426 from matrix-org/dbkr/profile_in_group_member_info

Show displayname / avatar in group member info
pull/21833/head
David Baker 2017-09-25 15:14:30 +01:00 committed by GitHub
commit d9c2f6e610
2 changed files with 18 additions and 5 deletions

View File

@ -152,12 +152,21 @@ module.exports = withMatrixClient(React.createClass({
</div>;
}
const BaseAvatar = sdk.getComponent('avatars.BaseAvatar');
const avatar = (
<BaseAvatar name={this.props.groupMember.userId} width={36} height={36} />
const avatarUrl = this.props.matrixClient.mxcUrlToHttp(
this.props.groupMember.avatarUrl,
36, 36, 'crop',
);
const groupMemberName = this.props.groupMember.userId;
const BaseAvatar = sdk.getComponent('avatars.BaseAvatar');
const avatar = (
<BaseAvatar name={this.props.groupMember.userId} width={36} height={36}
url={avatarUrl}
/>
);
const groupMemberName = (
this.props.groupMember.displayname || this.props.groupMember.userId
);
const EmojiText = sdk.getComponent('elements.EmojiText');
return (

View File

@ -48,11 +48,15 @@ export default withMatrixClient(React.createClass({
const EntityTile = sdk.getComponent('rooms.EntityTile');
const name = this.props.member.displayname || this.props.member.userId;
const avatarUrl = this.props.matrixClient.mxcUrlToHttp(
this.props.member.avatarUrl,
36, 36, 'crop',
);
const av = (
<BaseAvatar name={this.props.member.userId}
width={36} height={36}
url={this.props.matrixClient.mxcUrlToHttp(this.props.member.avatarUrl)}
url={avatarUrl}
/>
);