mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-05 21:59:34 +00:00
fix: harden dm command authorization in open mode
This commit is contained in:
@@ -161,7 +161,6 @@ export function resolveIMessageInboundDecision(params: {
|
||||
});
|
||||
const effectiveDmAllowFrom = accessDecision.effectiveAllowFrom;
|
||||
const effectiveGroupAllowFrom = accessDecision.effectiveGroupAllowFrom;
|
||||
const dmAuthorized = !isGroup && accessDecision.decision === "allow";
|
||||
|
||||
if (accessDecision.decision !== "allow") {
|
||||
if (isGroup) {
|
||||
@@ -287,7 +286,7 @@ export function resolveIMessageInboundDecision(params: {
|
||||
allowTextCommands: true,
|
||||
hasControlCommand: hasControlCommandInMessage,
|
||||
});
|
||||
const commandAuthorized = isGroup ? commandGate.commandAuthorized : dmAuthorized;
|
||||
const commandAuthorized = commandGate.commandAuthorized;
|
||||
if (isGroup && commandGate.shouldBlock) {
|
||||
if (params.logVerbose) {
|
||||
logInboundDrop({
|
||||
|
||||
Reference in New Issue
Block a user