From 804248d6ad57445f346150ae59c3a57b4a2c0ea7 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 18 Aug 2021 14:56:23 +0530 Subject: [PATCH] added sticker viewing support --- src/app/organisms/channel/ChannelViewContent.jsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/app/organisms/channel/ChannelViewContent.jsx b/src/app/organisms/channel/ChannelViewContent.jsx index ad0586c3..fa21897d 100644 --- a/src/app/organisms/channel/ChannelViewContent.jsx +++ b/src/app/organisms/channel/ChannelViewContent.jsx @@ -55,6 +55,7 @@ function isMedia(mE) { || mE.getContent()?.msgtype === 'm.image' || mE.getContent()?.msgtype === 'm.audio' || mE.getContent()?.msgtype === 'm.video' + || mE.getType() === 'm.sticker' ); } @@ -71,7 +72,10 @@ function genMediaContent(mE) { if (typeof mediaMXC === 'undefined' || mediaMXC === '') return Malformed event; - switch (mE.getContent()?.msgtype) { + let msgType = mE.getContent()?.msgtype; + if (mE.getType() === 'm.sticker') msgType = 'm.image'; + + switch (msgType) { case 'm.file': return (