openclaw/src
nicolasstanley 4a5e9f0a4f
fix(telegram): accept messages from group members in allowlisted groups (#9775)
* fix(telegram): accept messages from group members in allowlisted groups

Issue #4559: Telegram bot was silently dropping messages from non-paired users
in allowlisted group chats due to overly strict sender filtering.

The fix adds a check to distinguish between:
1. Group itself is allowlisted → accept messages from any member
2. Group is NOT allowlisted → only accept from allowlisted senders

Changes:
- Check if group ID is in the allowlist (or allowlist is wildcard)
- Only reject sender if they're not in allowlist AND group is not allowlisted
- Improved logging to indicate the actual reason for rejection

This preserves security controls while fixing the UX issue where group members
couldn't participate unless individually allowlisted.

Backwards compatible: existing allowlists continue to work as before.

* style: format telegram fix for oxfmt compliance

* refactor(telegram): clarify group allowlist semantics in fix for #4559

Changes:
- Rename 'isGroupInAllowlist' to 'isGroupChatIdInAllowlist' for clarity
- Expand comments to explain the semantic distinction:
  * Group chat ID in allowlist -> accept any group member (fixes #4559)
  * Group chat ID NOT in allowlist -> enforce sender allowlist (preserves security)
- This addresses concerns about config semantics raised in code review

The fix maintains backward compatibility:
- 'groupAllowFrom' with group chat IDs now correctly acts as group enablement
- 'groupAllowFrom' with sender IDs continues to work as sender allowlist
- Operators should use group chat IDs for group enablement, sender IDs for sender control

Note: If operators were using 'groupAllowFrom' with group IDs expecting sender-level
filtering, they should migrate to a separate sender allowlist config. This is the
intended behavior per issue #4559.

* Telegram: allow per-group groupPolicy overrides

* Telegram: support per-group groupPolicy overrides (#9775) (thanks @nicolasstanley)

---------

Co-authored-by: George Pickett <gpickett00@gmail.com>
2026-02-05 14:45:45 -08:00
..
acp chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
agents fix(errors): show clear billing error instead of cryptic API response (#8391) 2026-02-05 13:58:43 -08:00
auto-reply chore: apply local workspace updates (#9911) 2026-02-05 16:54:44 -05:00
browser Make openclaw consistent in this file (#8533) 2026-02-04 00:02:25 -05:00
canvas-host chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
channels feat: per-channel responsePrefix override (#9001) 2026-02-04 16:16:34 -05:00
cli CLI: sort commands alphabetically in help output 2026-02-05 21:23:41 +05:30
commands chore: apply local workspace updates (#9911) 2026-02-05 16:54:44 -05:00
compat refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
config fix(telegram): accept messages from group members in allowlisted groups (#9775) 2026-02-05 14:45:45 -08:00
cron fix cron scheduling and reminder delivery regressions (#9733) 2026-02-05 13:08:41 -08:00
daemon fix(runtime): bump minimum Node.js version to 22.12.0 (#5370) 2026-02-05 13:42:52 -08:00
discord fix: resolve discord owner allowFrom matches 2026-02-05 00:51:39 -08:00
docs Docs: landing page revamp (#8885) 2026-02-04 10:37:14 -05:00
feishu 🤖 Feishu: tighten mention gating 2026-02-05 12:33:59 -08:00
gateway chore: apply local workspace updates (#9911) 2026-02-05 16:54:44 -05:00
hooks fix: harden plugin and hook install paths 2026-02-02 02:07:47 -08:00
imessage feat: per-channel responsePrefix override (#9001) 2026-02-04 16:16:34 -05:00
infra fix(runtime): bump minimum Node.js version to 22.12.0 (#5370) 2026-02-05 13:42:52 -08:00
line feat: per-channel responsePrefix override (#9001) 2026-02-04 16:16:34 -05:00
link-understanding chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
logging chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
macos chore: Enable "curly" rule to avoid single-statement if confusion/errors. 2026-01-31 16:19:20 +09:00
markdown chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
media fix: expand SSRF guard coverage 2026-02-02 04:58:32 -08:00
media-understanding feat: add Claude Opus 4.6 to built-in model catalog (#9853) 2026-02-05 12:09:23 -08:00
memory chore: fix lint warnings 2026-02-02 23:45:05 -08:00
node-host fix: harden Windows exec allowlist 2026-02-03 09:34:25 -08:00
pairing chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
plugin-sdk feat: per-channel responsePrefix override (#9001) 2026-02-04 16:16:34 -05:00
plugins chore: Migrate to tsdown, speed up JS bundling by ~10x (thanks @hyf0). 2026-02-03 20:18:16 +09:00
process fix: skip extension append if command already has one 2026-01-31 20:39:33 -06:00
providers chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
routing chore: fix lint, and format after lint to catch reformats triggered by autofixes. 2026-02-01 13:19:06 +09:00
scripts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
security chore: apply local workspace updates (#9911) 2026-02-05 16:54:44 -05:00
sessions chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
shared/text chore: Enable "curly" rule to avoid single-statement if confusion/errors. 2026-01-31 16:19:20 +09:00
signal feat: per-channel responsePrefix override (#9001) 2026-02-04 16:16:34 -05:00
slack feat: per-channel responsePrefix override (#9001) 2026-02-04 16:16:34 -05:00
telegram fix(telegram): accept messages from group members in allowlisted groups (#9775) 2026-02-05 14:45:45 -08:00
terminal fix: error handling in restore failure reporting 2026-02-03 06:22:51 +00:00
test-helpers refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
test-utils chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
tts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
tui Tests: restore TUI gateway env 2026-02-04 19:09:52 -05:00
types fix: update pi packages to 0.51.0, remove bogus type augmentation 2026-02-02 01:52:33 +01:00
utils Memory: parse quoted qmd command 2026-02-02 23:45:05 -08:00
web chore: Typecheck test helper files. 2026-02-05 19:51:00 +09:00
whatsapp chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
wizard onboard: use shared completion helpers for shell completion setup 2026-02-04 19:51:06 +00:00
channel-web.barrel.test.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
channel-web.ts
docker-setup.test.ts refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
entry.ts fix(cli): avoid NODE_OPTIONS for --disable-warning (#9691) (thanks @18-RAJAT) 2026-02-05 12:05:14 -08:00
extensionAPI.ts chore: Migrate to tsdown, speed up JS bundling by ~10x (thanks @hyf0). 2026-02-03 20:18:16 +09:00
globals.test.ts
globals.ts chore: Enable "curly" rule to avoid single-statement if confusion/errors. 2026-01-31 16:19:20 +09:00
index.test.ts
index.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
logger.test.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
logger.ts chore: Enable "curly" rule to avoid single-statement if confusion/errors. 2026-01-31 16:19:20 +09:00
logging.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
polls.test.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
polls.ts
runtime.ts CLI: restore terminal state on exit 2026-02-03 06:10:19 +00:00
utils.test.ts chore: Enable `typescript/no-explicit-any` rule. 2026-02-02 16:18:09 +09:00
utils.ts chore: Enable "curly" rule to avoid single-statement if confusion/errors. 2026-01-31 16:19:20 +09:00
version.ts fix: improve build-info resolution for commit/version 2026-02-03 17:31:51 -08:00