diff --git a/src/components/views/rooms/EventTile.js b/src/components/views/rooms/EventTile.js index 22c3136737..e2f037ceb9 100644 --- a/src/components/views/rooms/EventTile.js +++ b/src/components/views/rooms/EventTile.js @@ -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 = ( -
- -
- ); - } - else { - avatar = ( -
- -
- ); + 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 = ( +
+ +
+ ); } if (needsSenderProfile) {