Skip to content

fix: allow commands in groups when no allowFrom is configured#1007

Open
BingqingLyu wants to merge 1 commit into
mainfrom
fork-pr-49958-fix-group-command-auth-unconfigured
Open

fix: allow commands in groups when no allowFrom is configured#1007
BingqingLyu wants to merge 1 commit into
mainfrom
fork-pr-49958-fix-group-command-auth-unconfigured

Conversation

@BingqingLyu

@BingqingLyu BingqingLyu commented Apr 27, 2026

Copy link
Copy Markdown
Owner

Problem

Slash commands (/status, /new, /reset) silently fail in group chats when no allowFrom list is configured. The bot shows no response at all.

Root Cause

In resolveCommandAuthorizedFromAuthorizers (src/channels/command-gating.ts), when useAccessGroups is enabled (the default) and no allowFrom list exists, the authorizers array contains { configured: false, allowed: false }.

The code authorizers.some(e => e.configured && e.allowed) returns false because configured is false — meaning "no allowlist was set up". This incorrectly denies ALL commands in groups without an explicit allowFrom list.

The !useAccessGroups path already handles this correctly:

const anyConfigured = authorizers.some(e => e.configured);
if (!anyConfigured) return true; // No restrictions = allow

Fix

Added the same !anyConfigured guard to the useAccessGroups=true path. Both paths now treat "no restrictions configured" as "allow" consistently.

2 files changed, 26 insertions, 1 deletion.

Testing

  • command-gating.test.ts: 10/10 pass
  • Feishu bot test suite: 59/59 pass
  • No behavioral change for groups with allowFrom configured

Fixes openclaw#49915

Made-with: Claude Code

When useAccessGroups is enabled but no allowFrom list exists,
commands were silently denied because the authorizer had
configured=false. This aligns the behavior with the existing
!useAccessGroups path which already treats unconfigured
authorizers as unrestricted.

Fixes openclaw#49915
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Feishu group chat: slash commands like /new, /status, and /model do not work and may lose message content

2 participants