make hiding redactions use new pattern

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
pull/21833/head
Michael Telatynski 2017-06-15 20:22:38 +01:00
parent cebb7182f0
commit f0f721aa32
1 changed files with 3 additions and 2 deletions

View File

@ -252,6 +252,9 @@ module.exports = React.createClass({
// Always show highlighted event
if (this.props.highlightedEventId === mxEv.getId()) return true;
// Hide redactions if behaviour enabled
if (mxEv.isRedacted() && this.props.hideRedactions) return false;
const isMemberEvent = mxEv.getType() === "m.room.member" && mxEv.getStateKey() !== undefined;
if (!isMemberEvent) {
return true; // bail early: all the checks below concern member events only
@ -511,8 +514,6 @@ module.exports = React.createClass({
continuation = false;
}
if (mxEv.isRedacted() && this.props.hideRedactions) return ret;
var eventId = mxEv.getId();
var highlight = (eventId == this.props.highlightedEventId);