From 486b2cf10259170c7478726c089ecd1bf9b749e4 Mon Sep 17 00:00:00 2001 From: Richard Lewis Date: Mon, 8 Jan 2018 11:32:38 +0000 Subject: [PATCH] Handle sticker message event. --- src/components/views/messages/MessageEvent.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/views/messages/MessageEvent.js b/src/components/views/messages/MessageEvent.js index 7dd5661bb8..53cbc3e5d3 100644 --- a/src/components/views/messages/MessageEvent.js +++ b/src/components/views/messages/MessageEvent.js @@ -54,7 +54,6 @@ module.exports = React.createClass({ 'm.notice': sdk.getComponent('messages.TextualBody'), 'm.emote': sdk.getComponent('messages.TextualBody'), 'm.image': sdk.getComponent('messages.MImageBody'), - 'm.sticker': sdk.getComponent('messages.MStickerBody'), 'm.file': sdk.getComponent('messages.MFileBody'), 'm.audio': sdk.getComponent('messages.MAudioBody'), 'm.video': sdk.getComponent('messages.MVideoBody'), @@ -65,6 +64,8 @@ module.exports = React.createClass({ let BodyType = UnknownBody; if (msgtype && bodyTypes[msgtype]) { BodyType = bodyTypes[msgtype]; + } else if (this.props.mxEvent.getType() === 'm.room.sticker') { + BodyType = sdk.getComponent('messages.MStickerBody'); } else if (content.url) { // Fallback to MFileBody if there's a content URL BodyType = bodyTypes['m.file'];