Commit b2a4ff7a authored by JC Brand's avatar JC Brand

muc-views: don't accept non-allowed commands

parent 79cc1607
......@@ -1410,6 +1410,10 @@ converse.plugins.add('converse-muc-views', {
return false;
}
}
const allowed_commands = this.getAllowedCommands();
if (!allowed_commands.includes(command)) {
return false;
}
switch (command) {
case 'admin': {
......@@ -1444,7 +1448,6 @@ converse.plugins.add('converse-muc-views', {
break;
}
case 'help': {
const allowed_commands = this.getAllowedCommands();
this.showHelpMessages([`<strong>${__("You can run the following commands")}</strong>`]);
this.showHelpMessages([
`<strong>/admin</strong>: ${__("Change user's affiliation to admin")}`,
......
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