mirror of https://github.com/vector-im/riot-web
Merge pull request #1965 from matrix-org/t3chguy/show_redacted_sticker
check type before msgtype in the case of `m.sticker` with msgtypepull/21833/head
commit
88a807d89b
|
@ -72,10 +72,10 @@ module.exports = React.createClass({
|
|||
let BodyType = UnknownBody;
|
||||
if (!this.props.mxEvent.isRedacted()) {
|
||||
// only resolve BodyType if event is not redacted
|
||||
if (msgtype && bodyTypes[msgtype]) {
|
||||
BodyType = bodyTypes[msgtype];
|
||||
} else if (type && evTypes[type]) {
|
||||
if (type && evTypes[type]) {
|
||||
BodyType = evTypes[type];
|
||||
} else if (msgtype && bodyTypes[msgtype]) {
|
||||
BodyType = bodyTypes[msgtype];
|
||||
} else if (content.url) {
|
||||
// Fallback to MFileBody if there's a content URL
|
||||
BodyType = bodyTypes['m.file'];
|
||||
|
|
Loading…
Reference in New Issue