fix this hiding unbans as found by Luke's review

pull/21833/head
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
1 changed files with 4 additions and 1 deletions

View File

@ -36,8 +36,11 @@ function _isLeaveOrJoin(ev) {
// dupe join event, fall through to hide rules // dupe join event, fall through to hide rules
} }
// this only applies to joins/leaves not invites/kicks/bans // 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) { export default function(ev, syncedSettings) {