fix this hiding unbans as found by Luke's review

This commit is contained in:
Michael Telatynski 2017-07-26 11:51:41 +01:00
parent f42ae1662b
commit 762e6780d7
No known key found for this signature in database
GPG key ID: 3F879DA5AD802A5E

View file

@ -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) {