From edccfeb20b28e0306e1fca1bffbf1b36d99bc821 Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Mon, 6 Mar 2017 10:26:26 +0000 Subject: [PATCH] No text required, do not continuate after redacted even It's curious, however, that a continuation occured after a redacted event, given that the event shouldn't have a sender --- src/components/structures/MessagePanel.js | 4 +++- src/components/views/messages/UnknownBody.js | 6 +----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/components/structures/MessagePanel.js b/src/components/structures/MessagePanel.js index 21665bb421..0b16a41590 100644 --- a/src/components/structures/MessagePanel.js +++ b/src/components/structures/MessagePanel.js @@ -411,7 +411,9 @@ module.exports = React.createClass({ // is this a continuation of the previous message? var continuation = false; - if (prevEvent !== null && prevEvent.sender && mxEv.sender + + if (prevEvent !== null + && !prevEvent.isRedacted() && prevEvent.sender && mxEv.sender && mxEv.sender.userId === prevEvent.sender.userId && mxEv.getType() == prevEvent.getType()) { continuation = true; diff --git a/src/components/views/messages/UnknownBody.js b/src/components/views/messages/UnknownBody.js index 374a4b9396..a0fe8fdf74 100644 --- a/src/components/views/messages/UnknownBody.js +++ b/src/components/views/messages/UnknownBody.js @@ -22,11 +22,7 @@ module.exports = React.createClass({ displayName: 'UnknownBody', render: function() { - const ev = this.props.mxEvent; - var text = ev.getContent().body; - if (ev.isRedacted()) { - text = "This event was redacted"; - } + const text = this.props.mxEvent.getContent().body; return ( {text}