diff --git a/src/components/structures/LoggedInView.js b/src/components/structures/LoggedInView.js index 147707b6fc..6adea56a23 100644 --- a/src/components/structures/LoggedInView.js +++ b/src/components/structures/LoggedInView.js @@ -131,6 +131,9 @@ export default React.createClass({ useCompactLayout: event.getContent().useCompactLayout, }); } + if (event.getType() === "m.ignored_user_list") { + dis.dispatch({action: "ignore_state_changed"}); + } }, _onKeyDown: function(ev) { diff --git a/src/components/structures/MessagePanel.js b/src/components/structures/MessagePanel.js index e5884973c6..6cb075183d 100644 --- a/src/components/structures/MessagePanel.js +++ b/src/components/structures/MessagePanel.js @@ -241,6 +241,10 @@ module.exports = React.createClass({ // TODO: Implement granular (per-room) hide options _shouldShowEvent: function(mxEv) { + if (MatrixClientPeg.get().isUserIgnored(mxEv.sender.userId)) { + return false; // ignored = no show (only happens if the ignore happens after an event was received) + } + const EventTile = sdk.getComponent('rooms.EventTile'); if (!EventTile.haveTileForEvent(mxEv)) { return false; // no tile = no show diff --git a/src/components/structures/TimelinePanel.js b/src/components/structures/TimelinePanel.js index 862c3f46d0..c4723f515d 100644 --- a/src/components/structures/TimelinePanel.js +++ b/src/components/structures/TimelinePanel.js @@ -384,6 +384,9 @@ var TimelinePanel = React.createClass({ this.sendReadReceipt(); this.updateReadMarker(); break; + case 'ignore_state_changed': + this.forceUpdate(); + break; } }, diff --git a/src/components/views/rooms/MemberInfo.js b/src/components/views/rooms/MemberInfo.js index b9324249e9..e21fd22e64 100644 --- a/src/components/views/rooms/MemberInfo.js +++ b/src/components/views/rooms/MemberInfo.js @@ -115,7 +115,7 @@ module.exports = withMatrixClient(React.createClass({ }, _checkIgnoreState: function() { - const isIgnoring = this.props.matrixClient.getIgnoredUsers().indexOf(this.props.member.userId) !== -1; + const isIgnoring = this.props.matrixClient.isUserIgnored(this.props.member.userId); this.setState({isIgnoring: isIgnoring}); },