openclaw/src/telegram
Tyler Yust 1007d71f0c
fix: comprehensive BlueBubbles and channel cleanup (#11093)
* feat(bluebubbles): auto-strip markdown from outbound messages (#7402)

* fix(security): add timeout to webhook body reading (#6762)

Adds 30-second timeout to readBody() in voice-call, bluebubbles, and nostr
webhook handlers. Prevents Slow-Loris DoS (CWE-400, CVSS 7.5).
Merged with existing maxBytes protection in voice-call.

* fix(security): unify Error objects and lint fixes in webhook timeouts (#6762)

* fix: prevent plugins from auto-enabling without user consent (#3961)

Changes default plugin enabled state from true to false in enablePluginEntry().
Preserves existing enabled:true values. Fixes #3932.

* fix: apply hierarchical mediaMaxMb config to all channels (#8749)

Generalizes resolveAttachmentMaxBytes() to use account → channel → global
config resolution for all channels, not just BlueBubbles. Fixes #7847.

* fix(bluebubbles): sanitize attachment filenames against header injection (#10333)

Strip ", \r, \n, and \\ from filenames after path.basename() to prevent
multipart Content-Disposition header injection (CWE-93, CVSS 5.4).
Also adds sanitization to setGroupIconBlueBubbles which had zero filename
sanitization.

* fix(lint): exclude extensions/ from Oxlint preflight check (#9313)

Extensions use PluginRuntime|null patterns that trigger
no-redundant-type-constituents because PluginRuntime resolves to any.
Excluding extensions/ from Oxlint unblocks user upgrades.
Re-applies the approach from closed PR #10087.

* fix(bluebubbles): add tempGuid to createNewChatWithMessage payload (#7745)

Non-Private-API mode (AppleScript) requires tempGuid in send payloads.
The main sendMessageBlueBubbles already had it, but createNewChatWithMessage
was missing it, causing 400 errors for new chat creation without Private API.

* fix: send stop-typing signal when run ends with NO_REPLY (#8785)

Adds onCleanup callback to the typing controller that fires when the
controller is cleaned up while typing was active (e.g., after NO_REPLY).
Channels using createTypingCallbacks automatically get stop-typing on
cleanup. This prevents the typing indicator from lingering in group chats
when the agent decides not to reply.

* fix(telegram): deduplicate skill commands in multi-agent setup (#5717)

Two fixes:
1. Skip duplicate workspace dirs when listing skill commands across agents.
   Multiple agents sharing the same workspace would produce duplicate commands
   with _2, _3 suffixes.
2. Clear stale commands via deleteMyCommands before registering new ones.
   Commands from deleted skills now get cleaned up on restart.

* fix: add size limits to unbounded in-memory caches (#4948)

Adds max-size caps with oldest-entry eviction to prevent OOM in
long-running deployments:
- BlueBubbles serverInfoCache: 64 entries (already has TTL)
- Google Chat authCache: 32 entries
- Matrix directRoomCache: 1024 entries
- Discord presenceCache: 5000 entries per account

* fix: address review concerns (#11093)

- Chain deleteMyCommands → setMyCommands to prevent race condition (#5717)
- Rename enablePluginEntry to registerPluginEntry (now sets enabled: false)
- Add Slow-Loris timeout test for readJsonBody (#6023)
2026-02-07 05:00:55 -08:00
..
bot fix(telegram): pass parentPeer for forum topic binding inheritance (#9789) 2026-02-05 18:25:03 +00:00
accounts.test.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
accounts.ts chore: Enable "curly" rule to avoid single-statement if confusion/errors. 2026-01-31 16:19:20 +09:00
allowed-updates.ts fix: refine telegram reactions (#964) (thanks @bohdanpodvirnyi) 2026-01-15 17:20:17 +00:00
api-logging.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
audit.test.ts chore: migrate to oxlint and oxfmt 2026-01-14 15:02:19 +00:00
audit.ts chore: Enable "curly" rule to avoid single-statement if confusion/errors. 2026-01-31 16:19:20 +09:00
bot-access.ts chore: Enable "curly" rule to avoid single-statement if confusion/errors. 2026-01-31 16:19:20 +09:00
bot-handlers.ts fix(telegram): accept messages from group members in allowlisted groups (#9775) 2026-02-05 14:45:45 -08:00
bot-message-context.dm-threads.test.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
bot-message-context.dm-topic-threadid.test.ts test(telegram): add DM topic threadId deliveryContext test for #8891 2026-02-05 15:33:30 +05:30
bot-message-context.sender-prefix.test.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
bot-message-context.ts fix(telegram): pass parentPeer for forum topic binding inheritance (#9789) 2026-02-05 18:25:03 +00:00
bot-message-dispatch.test.ts feat: per-channel responsePrefix override (#9001) 2026-02-04 16:16:34 -05:00
bot-message-dispatch.ts Telegram: remove @ts-nocheck from bot.ts, fix duplicate error handler, harden sticker caching (#9077) 2026-02-04 22:35:51 +00:00
bot-message.test.ts fix: emit diagnostics across channels 2026-01-21 00:30:34 +00:00
bot-message.ts Telegram: remove @ts-nocheck from bot-message.ts (#9180) 2026-02-05 00:20:44 +00:00
bot-native-commands.plugin-auth.test.ts refactor: use shared pairing store for telegram 2026-02-01 15:22:37 +05:30
bot-native-commands.test.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
bot-native-commands.ts fix: comprehensive BlueBubbles and channel cleanup (#11093) 2026-02-07 05:00:55 -08:00
bot-updates.ts Telegram: use Grammy types directly, add typed Probe/Audit to plugin interface (#8403) 2026-02-04 10:09:28 +00:00
bot.create-telegram-bot.accepts-group-messages-mentionpatterns-match-without-botusername.test.ts test: speed up telegram suites 2026-02-01 22:23:16 +00:00
bot.create-telegram-bot.applies-topic-skill-filters-system-prompts.test.ts test: speed up telegram suites 2026-02-01 22:23:16 +00:00
bot.create-telegram-bot.blocks-all-group-messages-grouppolicy-is.test.ts test: speed up telegram suites 2026-02-01 22:23:16 +00:00
bot.create-telegram-bot.dedupes-duplicate-callback-query-updates-by-update.test.ts test: speed up telegram suites 2026-02-01 22:23:16 +00:00
bot.create-telegram-bot.installs-grammy-throttler.test.ts test: speed up telegram suites 2026-02-01 22:23:16 +00:00
bot.create-telegram-bot.matches-tg-prefixed-allowfrom-entries-case-insensitively.test.ts test: speed up telegram suites 2026-02-01 22:23:16 +00:00
bot.create-telegram-bot.matches-usernames-case-insensitively-grouppolicy-is.test.ts test: speed up telegram suites 2026-02-01 22:23:16 +00:00
bot.create-telegram-bot.routes-dms-by-telegram-accountid-binding.test.ts fix(telegram): pass parentPeer for forum topic binding inheritance (#9789) 2026-02-05 18:25:03 +00:00
bot.create-telegram-bot.sends-replies-without-native-reply-threading.test.ts test: speed up telegram suites 2026-02-01 22:23:16 +00:00
bot.media.downloads-media-file-path-no-file-download.test.ts Channels: finish Feishu/Lark integration 2026-02-03 14:27:39 -08:00
bot.media.includes-location-text-ctx-fields-pins.test.ts refactor: use shared pairing store for telegram 2026-02-01 15:22:37 +05:30
bot.test.ts fix(telegram): accept messages from group members in allowlisted groups (#9775) 2026-02-05 14:45:45 -08:00
bot.ts fix(telegram): cast fetch for grammY ApiClientOptions 2026-02-06 15:45:34 -08:00
caption.ts refactor: share telegram caption splitting 2026-01-17 03:50:09 +00:00
download.test.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
download.ts fix(telegram): add timeout to file download to prevent DoS (CWE-400) 2026-02-02 13:39:39 +05:30
draft-chunking.test.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
draft-chunking.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
draft-stream.test.ts chore: Enable `typescript/no-explicit-any` rule. 2026-02-02 16:18:09 +09:00
draft-stream.ts fix: require thread specs for telegram sends 2026-02-02 09:26:59 +05:30
fetch.test.ts refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
fetch.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
format.test.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
format.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
group-migration.test.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
group-migration.ts chore: Enable "curly" rule to avoid single-statement if confusion/errors. 2026-01-31 16:19:20 +09:00
index.ts feat: unify provider reaction tools 2026-01-07 04:16:39 +01:00
inline-buttons.test.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
inline-buttons.ts chore: Enable "curly" rule to avoid single-statement if confusion/errors. 2026-01-31 16:19:20 +09:00
model-buttons.test.ts Telegram: fix model button review issues 2026-02-04 09:23:17 +05:30
model-buttons.ts Telegram: fix model button review issues 2026-02-04 09:23:17 +05:30
monitor.test.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
monitor.ts fix(telegram): handle Grammy HttpError network failures (#3815) (#7195) 2026-02-02 15:25:41 +00:00
network-config.test.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
network-config.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
network-errors.test.ts fix(telegram): recover from grammY "timed out" long-poll errors (#7239) 2026-02-02 22:37:22 +00:00
network-errors.ts fix(telegram): recover from grammY "timed out" long-poll errors (#7239) 2026-02-02 22:37:22 +00:00
probe.ts fix: normalize gateway dev mode detection 2026-01-18 01:08:47 +00:00
proxy.test.ts fix: honor Telegram proxy dispatcher (#4456) (thanks @spiceoogway) 2026-01-30 14:38:39 +05:30
proxy.ts fix: align proxy fetch typing 2026-02-04 04:09:53 -08:00
reaction-level.test.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
reaction-level.ts refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
send.caption-split.test.ts Telegram: harden network retries and config 2026-01-26 19:36:43 -05:00
send.edit-message.test.ts feat(telegram): add edit message action (#2394) (thanks @marcelomar21) 2026-01-26 15:34:47 -08:00
send.preserves-thread-params-plain-text-fallback.test.ts Telegram: harden network retries and config 2026-01-26 19:36:43 -05:00
send.proxy.test.ts Telegram: harden network retries and config 2026-01-26 19:36:43 -05:00
send.returns-undefined-empty-input.test.ts test: speed up telegram suites 2026-02-01 22:23:16 +00:00
send.ts fix: require thread specs for telegram sends 2026-02-02 09:26:59 +05:30
sent-message-cache.test.ts fix: lint errors 2026-01-15 17:07:38 +00:00
sent-message-cache.ts chore: Enable "curly" rule to avoid single-statement if confusion/errors. 2026-01-31 16:19:20 +09:00
sticker-cache.test.ts refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
sticker-cache.ts feat: add Claude Opus 4.6 to built-in model catalog (#9853) 2026-02-05 12:09:23 -08:00
targets.test.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
targets.ts chore: Enable "curly" rule to avoid single-statement if confusion/errors. 2026-01-31 16:19:20 +09:00
token.test.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
token.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
update-offset-store.test.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
update-offset-store.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
voice.test.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
voice.ts chore: Enable "curly" rule to avoid single-statement if confusion/errors. 2026-01-31 16:19:20 +09:00
webhook-set.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
webhook.test.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
webhook.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00