zeroclaw/src
ZeroClaw Contributor c0a80ad656 feat(channel): add mention_only option for Telegram groups
Adds mention_only config option to Telegram channel, allowing the bot
to only respond to messages that @-mention the bot in group chats.
Direct messages are always processed regardless of this setting.

Behavior:
- When mention_only = true: Bot only responds to group messages containing @botname
- When mention_only = false (default): Bot responds to all allowed messages
- DM/private chats always work regardless of mention_only setting

Implementation:
- Fetch and cache bot username from Telegram API on startup
- Check for @botname mention in group messages
- Strip mention from message content before processing

Config example:
[channels.telegram]
bot_token = "your_token"
mention_only = true

Changes:
- src/config/schema.rs: Add mention_only to TelegramConfig
- src/channels/telegram.rs: Implement mention_only logic + 6 new tests
- src/channels/mod.rs: Update factory calls
- src/cron/scheduler.rs: Update constructor call
- src/onboard/wizard.rs: Update wizard config
- src/daemon/mod.rs: Update test config
- src/integrations/registry.rs: Update test config
- TESTING_TELEGRAM.md: Add mention_only test section
- CHANGELOG.md: Document feature

Risk: medium
Backward compatible: Yes (default: false)
2026-02-18 19:51:42 +08:00
..
agent feat(providers): add native tool calling for OpenAI-compatible providers 2026-02-18 18:06:36 +08:00
approval refactor(sync): migrate remaining std mutex usage to parking_lot 2026-02-18 00:45:26 +08:00
auth fix(auth): rebase PR #200 onto main and restore auth CLI flow 2026-02-18 12:57:44 +08:00
channels feat(channel): add mention_only option for Telegram groups 2026-02-18 19:51:42 +08:00
config feat(channel): add mention_only option for Telegram groups 2026-02-18 19:51:42 +08:00
cost refactor(sync): migrate remaining std mutex usage to parking_lot 2026-02-18 00:45:26 +08:00
cron feat(channel): add mention_only option for Telegram groups 2026-02-18 19:51:42 +08:00
daemon feat(channel): add mention_only option for Telegram groups 2026-02-18 19:51:42 +08:00
doctor feat(doctor): harden provider and workspace diagnostics 2026-02-17 17:20:56 +08:00
gateway fix(channels): recover malformed invoke/tool_call output in daemon mode 2026-02-18 17:01:36 +08:00
hardware fix(agent): parse tool-call alias tags in channel runtime 2026-02-18 00:28:08 +08:00
health refactor(sync): migrate remaining std mutex usage to parking_lot 2026-02-18 00:45:26 +08:00
heartbeat test: deepen and complete project-wide test coverage (#297) 2026-02-16 05:58:24 -05:00
integrations feat(channel): add mention_only option for Telegram groups 2026-02-18 19:51:42 +08:00
memory feat(channel): stream LLM responses to Telegram via draft message edits 2026-02-18 16:33:33 +08:00
observability readd tests, remove markdown files 2026-02-18 14:42:39 +08:00
onboard feat(channel): add mention_only option for Telegram groups 2026-02-18 19:51:42 +08:00
peripherals fix(agent): parse tool-call alias tags in channel runtime 2026-02-18 00:28:08 +08:00
providers test: stabilize cron shell output capture and gemini warmup noop 2026-02-18 19:26:07 +08:00
rag chore(lint): extend low-risk clippy cleanup batch 2026-02-17 16:40:58 +08:00
runtime test(runtime): stabilize docker root mount assertion 2026-02-18 14:42:39 +08:00
security test(security): enforce lowercase token hex assertion 2026-02-18 16:56:45 +08:00
service fix(gateway): persist pairing tokens and honor docker config (#630) 2026-02-17 15:05:56 -05:00
skillforge fix(providers): use Bearer auth for Gemini CLI OAuth tokens 2026-02-15 14:32:33 -05:00
skills Merge remote-tracking branch 'origin/main' into feat/glm-provider 2026-02-17 13:27:58 -05:00
tools fix(channels): recover malformed invoke/tool_call output in daemon mode 2026-02-18 17:01:36 +08:00
tunnel test: deepen and complete project-wide test coverage (#297) 2026-02-16 05:58:24 -05:00
identity.rs fix(identity): normalize canonical AIEOS schema payloads 2026-02-18 19:25:12 +08:00
lib.rs fix(auth): rebase PR #200 onto main and restore auth CLI flow 2026-02-18 12:57:44 +08:00
main.rs fix(auth): rebase PR #200 onto main and restore auth CLI flow 2026-02-18 12:57:44 +08:00
migration.rs readd tests, remove markdown files 2026-02-18 14:42:39 +08:00
util.rs fix(channels): check response status in send() for Telegram, Slack, and Discord 2026-02-15 09:48:58 -05:00