Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1426 from matrix-org/dbkr/profile_in_group_member…
Browse files Browse the repository at this point in the history
…_info

Show displayname / avatar in group member info
  • Loading branch information
dbkr authored Sep 25, 2017
2 parents af2df77 + 0b96871 commit d9c2f6e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
13 changes: 11 additions & 2 deletions src/components/views/groups/GroupMemberInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,21 @@ module.exports = withMatrixClient(React.createClass({
</div>;
}

const avatarUrl = this.props.matrixClient.mxcUrlToHttp(
this.props.groupMember.avatarUrl,
36, 36, 'crop',
);

const BaseAvatar = sdk.getComponent('avatars.BaseAvatar');
const avatar = (
<BaseAvatar name={this.props.groupMember.userId} width={36} height={36} />
<BaseAvatar name={this.props.groupMember.userId} width={36} height={36}
url={avatarUrl}
/>
);

const groupMemberName = this.props.groupMember.userId;
const groupMemberName = (
this.props.groupMember.displayname || this.props.groupMember.userId
);

const EmojiText = sdk.getComponent('elements.EmojiText');
return (
Expand Down
6 changes: 5 additions & 1 deletion src/components/views/groups/GroupMemberTile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}
/>
);

Expand Down

0 comments on commit d9c2f6e

Please sign in to comment.