1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-07-28 15:22:05 +03:00

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
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'];