update comment to make explain behaviour better

pull/21833/head
Michael Telatynski 2017-07-26 13:37:33 +01:00
parent 3eb87e2aa3
commit 3b8c408482
No known key found for this signature in database
GPG Key ID: 3F879DA5AD802A5E
1 changed files with 1 additions and 1 deletions

View File

@ -37,7 +37,7 @@ function _isLeaveOrJoin(ev) {
}
// this only applies to joins/leaves not invites/kicks/bans
// this only applies to joins/invited joins/leaves not invites/kicks/bans
const isJoin = membership === 'join' && prevMembership !== 'ban';
const isLeave = membership === 'leave' && ev.getStateKey() === ev.getSender();
return isJoin || isLeave;