Fix status: send via Telegram directly, short ack to stdout
Prevents OpenClaw from relaying full report as plain-text duplicate. sendTelegram() handles formatted delivery, stdout just says "sent". Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -267,10 +267,9 @@ if (jsonMode) {
|
||||
} else {
|
||||
const report = formatReport(status);
|
||||
const settings = loadConfig(resolve(__dir, 'config/settings.json'));
|
||||
// Send via Telegram directly if configured (so markdown renders)
|
||||
if (settings.notifications?.bot_token && settings.notifications?.telegram_user_id) {
|
||||
await sendTelegram(settings, report);
|
||||
// Don't also print to stdout — OpenClaw would relay it as a duplicate plain-text message
|
||||
console.log('Status sent to Telegram.');
|
||||
} else {
|
||||
console.log(report);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user