Skip to content

fix(feishu): honor wildcard group config for reply policy#19254

Closed
WaynePika wants to merge 1 commit intoopenclaw:mainfrom
WaynePika:fix/feishu-wildcard-group-config
Closed

fix(feishu): honor wildcard group config for reply policy#19254
WaynePika wants to merge 1 commit intoopenclaw:mainfrom
WaynePika:fix/feishu-wildcard-group-config

Conversation

@WaynePika
Copy link
Contributor

@WaynePika WaynePika commented Feb 17, 2026

Summary

Fix Feishu group wildcard policy handling so channels.feishu.groups["*"] is applied when a specific group ID entry is missing.

Without this fallback, wildcard group settings (for example requireMention: false) are ignored for unmatched groups, causing group behavior to unexpectedly fall back to global defaults.

Changes

  • extensions/feishu/src/policy.ts
    • In resolveFeishuGroupConfig, return the wildcard group config (groups["*"]) when no exact/case-insensitive match exists.
  • extensions/feishu/src/policy.test.ts (new)
    • Added tests for:
      • wildcard fallback when direct group config is absent
      • exact match taking precedence over wildcard
      • case-insensitive explicit group ID matching still working

Repro

  1. Configure:
    • channels.feishu.groups["*"].requireMention = false
    • no explicit entry for a target group
  2. Send a group message without mentioning the bot.

Before

The wildcard was not applied; message could still be treated as mention-gated.

After

The wildcard config is applied; behavior follows groups["*"] as expected.

Validation

  • Ran:
    • pnpm exec vitest run --config vitest.extensions.config.ts extensions/feishu/src/policy.test.ts
  • Result:
    • 1 passed, 3 passed

Greptile Summary

Adds wildcard fallback logic to resolveFeishuGroupConfig so that channels.feishu.groups["*"] configuration is properly applied when no explicit group ID match exists. This fixes unintended fallback to global defaults for unconfigured groups.

  • Logic change: Returns wildcard config (groups["*"]) after exhausting exact and case-insensitive matching
  • Test coverage: Added comprehensive tests validating wildcard fallback, precedence rules, and case-insensitive matching
  • Consistency: Aligns with similar wildcard patterns in other channel extensions (e.g., IRC)

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The change is simple, well-tested, and follows established patterns in the codebase. The logic correctly implements wildcard fallback with proper precedence (exact > case-insensitive > wildcard). Tests cover all critical paths including edge cases.
  • No files require special attention

Last reviewed commit: 2e8ec64

(3/5) Reply to the agent's comments like "Can you suggest a fix for this @greptileai?" or ask follow-up questions!

@openclaw-barnacle openclaw-barnacle bot added channel: feishu Channel integration: feishu size: S labels Feb 17, 2026
@openclaw-barnacle
Copy link

This pull request has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.

@openclaw-barnacle openclaw-barnacle bot added the stale Marked as stale due to inactivity label Feb 28, 2026
@Takhoffman
Copy link
Contributor

Thanks again for this work and for surfacing the fix.

Closing this PR as superseded by #29456, which lands the same behavior on current main with full verification and preserved credit.

Really appreciate the contribution.

@Takhoffman Takhoffman closed this Feb 28, 2026
@WaynePika
Copy link
Contributor Author

WaynePika commented Mar 2, 2026 via email

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

Labels

channel: feishu Channel integration: feishu size: S stale Marked as stale due to inactivity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants