Commit de1071bd authored by JC Brand's avatar JC Brand

Add `isModerator` method on the occupant model

parent 216a67c1
......@@ -1836,7 +1836,11 @@ converse.plugins.add('converse-muc', {
},
isMember () {
return _.includes(['admin', 'owner', 'member'], this.get('affiliation'));
return ['admin', 'owner', 'member'].includes(this.get('affiliation'));
},
isModerator () {
return ['admin', 'owner'].includes(this.get('affiliation')) || this.get('role') === 'moderator';
},
isSelf () {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment