show redacted stickers like other redacted messages

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2018-06-13 09:28:35 +01:00
parent e858cf3bcb
commit 846c14062a
No known key found for this signature in database
GPG key ID: 3F879DA5AD802A5E
2 changed files with 10 additions and 3 deletions

View file

@ -69,7 +69,8 @@ module.exports = React.createClass({
if (msgtype && bodyTypes[msgtype]) {
BodyType = bodyTypes[msgtype];
} else if (this.props.mxEvent.getType() === 'm.sticker') {
BodyType = sdk.getComponent('messages.MStickerBody');
// if sticker is redacted, show UnknownBody otherwise it'll fall through to elif
BodyType = this.props.mxEvent.isRedacted() ? UnknownBody : sdk.getComponent('messages.MStickerBody');
} else if (content.url) {
// Fallback to MFileBody if there's a content URL
BodyType = bodyTypes['m.file'];