|
@@ -298,7 +298,7 @@ export function showOccupantModal (ev, occupant) {
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
-export async function parseMessageForMUCCommands (muc, text) {
|
|
|
|
|
|
+export function parseMessageForMUCCommands (muc, text) {
|
|
if (
|
|
if (
|
|
api.settings.get('muc_disable_slash_commands') &&
|
|
api.settings.get('muc_disable_slash_commands') &&
|
|
!Array.isArray(api.settings.get('muc_disable_slash_commands'))
|
|
!Array.isArray(api.settings.get('muc_disable_slash_commands'))
|
|
@@ -311,11 +311,6 @@ export async function parseMessageForMUCCommands (muc, text) {
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
|
|
- const handled = await api.hook('parseMessageForCommands', {model: muc, text}, false);
|
|
|
|
- if (handled) {
|
|
|
|
- return true;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
const args = text.slice(('/' + command).length + 1).trim();
|
|
const args = text.slice(('/' + command).length + 1).trim();
|
|
if (!muc.getAllowedCommands().includes(command)) {
|
|
if (!muc.getAllowedCommands().includes(command)) {
|
|
return false;
|
|
return false;
|