fix(telegram): notify users when agent returns empty response

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
kiranjd
2026-01-27 13:33:41 +05:30
committed by Ayaan Zaidi
parent 34291321b4
commit a2d06e75b0
3 changed files with 19 additions and 2 deletions

View File

@@ -488,7 +488,7 @@ export const registerTelegramNativeCommands = ({
cfg,
dispatcherOptions: {
responsePrefix: resolveEffectiveMessagesConfig(cfg, route.agentId).responsePrefix,
deliver: async (payload) => {
deliver: async (payload, info) => {
await deliverReplies({
replies: [payload],
chatId: String(chatId),
@@ -501,6 +501,7 @@ export const registerTelegramNativeCommands = ({
tableMode,
chunkMode,
linkPreview: telegramCfg.linkPreview,
notifyEmptyResponse: info.kind === "final",
});
},
onError: (err, info) => {