From b489a7c0d53fa5a6484b605f03249164330c5b76 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Fri, 27 Mar 2020 00:50:41 +0000 Subject: [PATCH] Allow reacting to stickers Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/utils/EventUtils.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/utils/EventUtils.js b/src/utils/EventUtils.js index 7e33aaed81..ac7ac8c9ec 100644 --- a/src/utils/EventUtils.js +++ b/src/utils/EventUtils.js @@ -31,13 +31,13 @@ export function isContentActionable(mxEvent) { // status is SENT before remote-echo, null after const isSent = !eventStatus || eventStatus === EventStatus.SENT; - if (isSent && mxEvent.getType() === 'm.room.message') { - const content = mxEvent.getContent(); - if ( - content.msgtype && - content.msgtype !== 'm.bad.encrypted' && - content.hasOwnProperty('body') - ) { + if (isSent) { + if (mxEvent.getType() === 'm.room.message') { + const content = mxEvent.getContent(); + if (content.msgtype && content.msgtype !== 'm.bad.encrypted' && content.hasOwnProperty('body')) { + return true; + } + } else if (mxEvent.getType() === 'm.sticker') { return true; } }