fix(heartbeat): pass accountId for Telegram delivery#516
Merged
steipete merged 3 commits intoopenclaw:mainfrom Jan 8, 2026
Merged
fix(heartbeat): pass accountId for Telegram delivery#516steipete merged 3 commits intoopenclaw:mainfrom
steipete merged 3 commits intoopenclaw:mainfrom
Conversation
Fixes parameter mismatch between AI tool schema and internal validation. The TypeBox schema now uses `jobId` for update/remove/run/runs actions, matching what users expect based on the returned job objects. Changes: - Changed parameter from `id` to `jobId` in TypeBox schema for update/remove/run/runs - Updated execute function to read `jobId` parameter - Updated tests to use `jobId` in input parameters The gateway protocol still uses `id` internally - the tool now maps `jobId` from the AI to `id` for the gateway call. Fixes openclaw#185 Co-Authored-By: Claude <noreply@anthropic.com>
Heartbeat Telegram delivery was failing when the bot token was configured only via telegram.botToken in config (without TELEGRAM_BOT_TOKEN environment variable). Root cause: deliverOutboundPayloads was called without accountId parameter, so sendMessageTelegram couldn't determine which account to use and couldn't find the token from config. Fix: Resolve default Telegram accountId when provider is "telegram" and pass it to deliverOutboundPayloads. This follows the same pattern used elsewhere in the codebase (e.g., cron uses resolveTelegramToken). Changes: - Added import for resolveDefaultTelegramAccountId - Added accountId resolution for telegram provider - Updated deliverOutboundPayloads call to include accountId Fixes openclaw#318 Co-Authored-By: Claude <noreply@anthropic.com>
steipete
added a commit
that referenced
this pull request
Jan 8, 2026
Contributor
|
Landed on main. Updates: Telegram heartbeat resolves accountId from config, cron tool supports canonical with legacy uid=501(steipete) gid=20(staff) groups=20(staff),12(everyone),61(localaccounts),79(_appserverusr),80(admin),81(_appserveradm),701(com.apple.sharepoint.group.1),33(_appstore),98(_lpadmin),100(_lpoperator),204(_developer),250(_analyticsusers),395(com.apple.access_ftp),398(com.apple.access_screensharing),399(com.apple.access_ssh),400(com.apple.access_remote_ae) compat + changelog. SHAs: 9d42972, 4dac298, 871c9e5. Thanks @YuriNachos! |
Contributor
|
Landed on main. Updates: Telegram heartbeat resolves accountId from config, cron tool supports canonical |
4 tasks
steipete
added a commit
that referenced
this pull request
Jan 8, 2026
zooqueen
pushed a commit
to hanzoai/bot
that referenced
this pull request
Mar 6, 2026
zooqueen
pushed a commit
to hanzoai/bot
that referenced
this pull request
Mar 6, 2026
…m-account-id fix(heartbeat): pass accountId for Telegram delivery
zooqueen
pushed a commit
to hanzoai/bot
that referenced
this pull request
Mar 6, 2026
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.
Description
This PR fixes Telegram heartbeat delivery when the bot token is configured only via
telegram.botTokenin config (withoutTELEGRAM_BOT_TOKENenvironment variable).Root Cause
The
deliverOutboundPayloadsfunction inrunHeartbeatOncewas called without theaccountIdparameter. WhenaccountIdis not provided,sendMessageTelegramcannot determine which account to use and cannot locate the token from config, falling back only to theTELEGRAM_BOT_TOKENenvironment variable.Changes
resolveDefaultTelegramAccountIdfrom../telegram/accounts.jsdeliverOutboundPayloadscall to include theaccountIdparameterImpact
resolveTelegramToken)Testing
npm run buildnpm run lintFixes #318
AI-assisted PR: This PR was created with assistance from Claude Code. The fix follows the existing token resolution pattern used elsewhere in the codebase.