|
@@ -128,6 +128,13 @@ export class RelationsService {
|
|
|
|
|
|
|
|
[...singleUse, ...broadCastUse].forEach(async(tempCommandName) => {
|
|
[...singleUse, ...broadCastUse].forEach(async(tempCommandName) => {
|
|
|
|
|
|
|
|
|
|
+ // ex. search OR search:handlerName
|
|
|
|
|
+ const commandRegExp = new RegExp(`(^${tempCommandName}$)|(^${tempCommandName}:\\w+)`);
|
|
|
|
|
+ // skip this forEach loop if the requested command is not in permissionsForBroadcastUseCommands and permissionsForSingleUseCommands
|
|
|
|
|
+ if (!commandRegExp.test(actionId) && !commandRegExp.test(callbackId)) {
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
// case: singleUse
|
|
// case: singleUse
|
|
|
permissionForInteractions = relation.permissionsForSingleUseCommands[tempCommandName];
|
|
permissionForInteractions = relation.permissionsForSingleUseCommands[tempCommandName];
|
|
|
// case: broadcastUse
|
|
// case: broadcastUse
|