Merge pull request #4288 from matrix-org/t3chguy/react_stickers

Deem m.sticker events as actionable for reacting
pull/21833/head
Michael Telatynski 2020-04-07 17:10:42 +01:00 committed by GitHub
commit 24a5d8355f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 7 deletions

View File

@ -31,13 +31,13 @@ export function isContentActionable(mxEvent) {
// status is SENT before remote-echo, null after // status is SENT before remote-echo, null after
const isSent = !eventStatus || eventStatus === EventStatus.SENT; const isSent = !eventStatus || eventStatus === EventStatus.SENT;
if (isSent && mxEvent.getType() === 'm.room.message') { if (isSent) {
const content = mxEvent.getContent(); if (mxEvent.getType() === 'm.room.message') {
if ( const content = mxEvent.getContent();
content.msgtype && if (content.msgtype && content.msgtype !== 'm.bad.encrypted' && content.hasOwnProperty('body')) {
content.msgtype !== 'm.bad.encrypted' && return true;
content.hasOwnProperty('body') }
) { } else if (mxEvent.getType() === 'm.sticker') {
return true; return true;
} }
} }