mirror of
https://github.com/element-hq/element-web
synced 2024-11-27 11:47:23 +03:00
fix(EventTile): made revisions
This commit is contained in:
parent
f271e117cf
commit
5e239690da
1 changed files with 15 additions and 19 deletions
|
@ -745,26 +745,22 @@ export default class EventTile extends React.Component {
|
|||
}
|
||||
|
||||
if (this.props.mxEvent.sender && avatarSize) {
|
||||
if(this.props.mxEvent.getType()==='m.room.third_party_invite') {
|
||||
avatar = (
|
||||
<div className="mx_EventTile_avatar">
|
||||
<MemberAvatar member={this.props.mxEvent.target}
|
||||
width={avatarSize} height={avatarSize}
|
||||
viewUserOnClick={true}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
else {
|
||||
avatar = (
|
||||
<div className="mx_EventTile_avatar">
|
||||
<MemberAvatar member={this.props.mxEvent.sender}
|
||||
width={avatarSize} height={avatarSize}
|
||||
viewUserOnClick={true}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
let member;
|
||||
// set member to receiver (target) if it is a 3PID invite
|
||||
// so that the correct avatar is show
|
||||
if (this.props.mxEvent.getContent().third_party_invite) {
|
||||
member=this.props.mxEvent.target;
|
||||
} else {
|
||||
member=this.props.mxEvent.sender;
|
||||
}
|
||||
avatar = (
|
||||
<div className="mx_EventTile_avatar">
|
||||
<MemberAvatar member={member}
|
||||
width={avatarSize} height={avatarSize}
|
||||
viewUserOnClick={true}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
if (needsSenderProfile) {
|
||||
|
|
Loading…
Reference in a new issue