hermes - 💡(How to fix) Fix [Feature]: Add option to ignore @all/@everyone mentions in Feishu group chats

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Fix Action

Fix / Workaround

Current Workaround

Code Example

# gateway/platforms/feishu.py:4093-4097
def _mentions_self(self, message: Any) -> bool:
    # @_all is Feishu's @everyone placeholder.
    raw_content = getattr(message, "content", "") or ""
    if "@_all" in raw_content:
        return True  # ← Hardcoded, always triggers bot

---

FEISHU_IGNORE_MENTION_ALL=true

---

feishu:
  ignore_mention_all: true

---

def _mentions_self(self, message: Any) -> bool:
    raw_content = getattr(message, "content", "") or ""
    
    # Check ignore_mention_all config
    if not self._ignore_mention_all:
        if "@_all" in raw_content:
            return True
    
    # ... rest of the logic
RAW_BUFFERClick to expand / collapse

Problem Description

Currently, Hermes Bot in Feishu always responds when someone uses @所有人 (everyone mention), even if the bot is not explicitly mentioned. This is hardcoded behavior in the Feishu adapter:

# gateway/platforms/feishu.py:4093-4097
def _mentions_self(self, message: Any) -> bool:
    # @_all is Feishu's @everyone placeholder.
    raw_content = getattr(message, "content", "") or ""
    if "@_all" in raw_content:
        return True  # ← Hardcoded, always triggers bot

In many enterprise/group scenarios, @所有人 is used for general announcements (e.g., system notifications, team updates) that don't require bot intervention. The bot responding to every @所有人 creates noise and is often unwanted.

Proposed Solution

Add a configuration option to control whether @所有人 triggers the bot:

Option 1: Environment Variable

FEISHU_IGNORE_MENTION_ALL=true

Option 2: YAML Config

feishu:
  ignore_mention_all: true

Implementation

Modify _mentions_self() in gateway/platforms/feishu.py:

def _mentions_self(self, message: Any) -> bool:
    raw_content = getattr(message, "content", "") or ""
    
    # Check ignore_mention_all config
    if not self._ignore_mention_all:
        if "@_all" in raw_content:
            return True
    
    # ... rest of the logic

Use Cases

  1. Enterprise groups: @所有人 is frequently used for company-wide announcements where bot intervention is not needed
  2. Notification groups: Groups dedicated to system alerts/notifications where bot should only respond to explicit @botname mentions
  3. Multi-purpose groups: General discussion groups where @所有人 is used for important human-to-human communication

Current Workaround

None. The behavior is hardcoded and cannot be configured.

Related Issues

  • #5465 - Support require_mention: false for group chats in Feishu

Would you be willing to submit a PR?

Yes, I can submit a PR for this feature if the maintainers approve the approach.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING