feat(feishu): allow disabling group mention requirement - #17406
Closed
de1tydev wants to merge 1 commit into
Closed
Conversation
Collaborator
This was referenced Apr 29, 2026
de1tydev
force-pushed
the
feat/feishu-group-require-mention
branch
from
May 2, 2026 01:20
c95e6cd to
bf7502c
Compare
|
+1 |
Contributor
|
This looks implemented on current main, so this PR can be closed as covered by a later merged Feishu change. This is an automated hermes-sweeper review. Evidence:
Prior discussion on this PR also flagged it as duplicate work for the same Feishu group-chat |
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds a Feishu/Lark option to let allowed group messages trigger the bot without an explicit
@mention.The default behavior is unchanged: group messages still require an
@mention unless this option is explicitly disabled.The safety gate is preserved. Feishu group policy / allowlist checks still run first, so disabling mention requirements does not make every group user able to trigger the bot.
Supported configuration:
Supported environment variables:
FEISHU_REQUIRE_MENTION=false # or HERMES_FEISHU_REQUIRE_MENTION=falseAccepted boolean values:
true/false,1/0,yes/no,on/off. Invalid values fall back to the safer default: requiring mentions.Feishu/Lark apps still need permission to receive group messages that do not mention the bot; this option only controls Hermes-side filtering after Feishu delivers the event.
Related Issue
Fixes #10275
Fixes #9835
Related / overlapping PRs: #15525 and #12887.
This PR keeps the change intentionally small: it preserves the group policy / allowlist gate before bypassing mention matching, supports both config and env vars, keeps the safe default enabled, documents the option, and includes directed unit tests.
Type of Change
Changes Made
gateway/config.pyFEISHU_REQUIRE_MENTION/HERMES_FEISHU_REQUIRE_MENTIONinto Feishu platform extra config.gateway/platforms/feishu.pyrequire_mentionsetting with safe defaulttrue.@_alland bot mention behavior unchanged when mention requirement is enabled.tests/gateway/test_feishu.pywebsite/docs/user-guide/messaging/feishu.mdHow to Test
python -m py_compile gateway/config.py gateway/platforms/feishu.py python -m pytest tests/gateway/test_feishu.py -q -o 'addopts=' git diff --check origin/main..HEADResult locally:
Checklist
Code
pytest tests/ -qand all tests passDocumentation & Housekeeping
cli-config.yaml.exampleif I added/changed config keys — N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — N/A