From e95a859ee96759442e324d7c7c74ef614e3ba96e Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 17 Aug 2021 16:51:22 +0530 Subject: [PATCH] Fixed #59 : Updated channel intro --- src/app/organisms/channel/ChannelViewContent.jsx | 6 +++++- src/app/organisms/channel/ChannelViewHeader.jsx | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/app/organisms/channel/ChannelViewContent.jsx b/src/app/organisms/channel/ChannelViewContent.jsx index da36ed1..b745209 100644 --- a/src/app/organisms/channel/ChannelViewContent.jsx +++ b/src/app/organisms/channel/ChannelViewContent.jsx @@ -119,11 +119,15 @@ function genMediaContent(mE) { } function genChannelIntro(mEvent, roomTimeline) { + const mx = initMatrix.matrixClient; const roomTopic = roomTimeline.room.currentState.getStateEvents('m.room.topic')[0]?.getContent().topic; + const isDM = initMatrix.roomList.directs.has(roomTimeline.roomId); + let avatarSrc = roomTimeline.room.getAvatarUrl(mx.baseUrl, 80, 80, 'crop'); + avatarSrc = isDM ? roomTimeline.room.getAvatarFallbackMember()?.getAvatarUrl(mx.baseUrl, 80, 80, 'crop') : avatarSrc; return (