You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-16 22:01:54 +03:00
Hide events that were sent by ignored users
This code only kicks in if the user was ignored after an event was sent. The homeserver should prevent other events from coming in. Signed-off-by: Travis Ralston <travpc@gmail.com>
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user