From: unknown Date: Wed, 18 Aug 2021 09:26:23 +0000 (+0530) Subject: added sticker viewing support X-Git-Tag: v1.2.0~19 X-Git-Url: https://git.wafflesoft.org/?a=commitdiff_plain;h=804248d6ad57445f346150ae59c3a57b4a2c0ea7;p=cinny.git added sticker viewing support --- diff --git a/src/app/organisms/channel/ChannelViewContent.jsx b/src/app/organisms/channel/ChannelViewContent.jsx index ad0586c..fa21897 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 (