From 5e239690da24dc50e7fb352d895b2ef4f06bb877 Mon Sep 17 00:00:00 2001 From: Arsh Sharma Date: Wed, 25 Nov 2020 12:46:14 +0530 Subject: [PATCH] fix(EventTile): made revisions --- src/components/views/rooms/EventTile.js | 34 +++++++++++-------------- 1 file changed, 15 insertions(+), 19 deletions(-) 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) {