Merge pull request #5442 from RinkiyaKeDad/avatar-fix
Fixed Avatar for 3PID invites
This commit is contained in:
commit
d4ed4a135c
1 changed files with 15 additions and 6 deletions
|
@ -745,13 +745,22 @@ export default class EventTile extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.props.mxEvent.sender && avatarSize) {
|
if (this.props.mxEvent.sender && avatarSize) {
|
||||||
|
let member;
|
||||||
|
// set member to receiver (target) if it is a 3PID invite
|
||||||
|
// so that the correct avatar is shown as the text is
|
||||||
|
// `$target accepted the invitation for $email`
|
||||||
|
if (this.props.mxEvent.getContent().third_party_invite) {
|
||||||
|
member = this.props.mxEvent.target;
|
||||||
|
} else {
|
||||||
|
member = this.props.mxEvent.sender;
|
||||||
|
}
|
||||||
avatar = (
|
avatar = (
|
||||||
<div className="mx_EventTile_avatar">
|
<div className="mx_EventTile_avatar">
|
||||||
<MemberAvatar member={this.props.mxEvent.sender}
|
<MemberAvatar member={member}
|
||||||
width={avatarSize} height={avatarSize}
|
width={avatarSize} height={avatarSize}
|
||||||
viewUserOnClick={true}
|
viewUserOnClick={true}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue