You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-24 06:02:08 +03:00
fix this hiding unbans as found by Luke's review
This commit is contained in:
@ -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) {
|
||||||
|
Reference in New Issue
Block a user