Only show new moderator status when not already admin or owner

This commit is contained in:
JC Brand 2019-05-14 13:55:19 +02:00
parent 14708af715
commit 1d9e1a62df

View File

@ -721,7 +721,12 @@ converse.plugins.add('converse-muc-views', {
this.showChatEvent(__("%1$s has been muted", occupant.get('nick')))
}
if (occupant.get('role') === 'moderator') {
this.showChatEvent(__("%1$s is now a moderator", occupant.get('nick')))
if (!['owner', 'admin'].includes(occupant.get('affiliation'))) {
// We only show this message if the user isn't already
// an admin or owner, otherwise this isn't new
// information.
this.showChatEvent(__("%1$s is now a moderator", occupant.get('nick')))
}
}
},