diff --git a/src/shouldHideEvent.js b/src/shouldHideEvent.js index c97ee2cd3c..6e0926e684 100644 --- a/src/shouldHideEvent.js +++ b/src/shouldHideEvent.js @@ -36,8 +36,11 @@ function _isLeaveOrJoin(ev) { // dupe join event, fall through to hide rules } + // this only applies to joins/leaves not invites/kicks/bans - return membership === 'join' || (membership === 'leave' && ev.getStateKey() === ev.getSender()); + const isJoin = membership === 'join' && prevMembership !== 'ban'; + const isLeave = membership === 'leave' && ev.getStateKey() === ev.getSender(); + return isJoin || isLeave; } export default function(ev, syncedSettings) {