fix(telegram): require observed final delivery

This commit is contained in:
Ayaan Zaidi
2026-05-03 20:41:38 +05:30
parent 453be4216b
commit 5130622750

View File

@@ -17,10 +17,7 @@ import type {
TelegramAccountConfig,
} from "openclaw/plugin-sdk/config-types";
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
import {
hasFinalInboundReplyDispatch,
runInboundReplyTurn,
} from "openclaw/plugin-sdk/inbound-reply-dispatch";
import { runInboundReplyTurn } from "openclaw/plugin-sdk/inbound-reply-dispatch";
import {
createOutboundPayloadPlan,
projectOutboundPayloadPlanForDelivery,
@@ -1307,7 +1304,6 @@ export const dispatchTelegramMessage = async ({
}
if (
!queuedFinal &&
!sentFallback &&
!dispatchError &&
!deliverySummary.delivered &&
@@ -1341,13 +1337,7 @@ export const dispatchTelegramMessage = async ({
});
}
const hasFinalResponse = hasFinalInboundReplyDispatch(
{ queuedFinal },
{
fallbackDelivered: sentFallback || suppressSilentReplyFallback,
deliverySummaryDelivered: deliverySummary.delivered,
},
);
const hasFinalResponse = deliverySummary.delivered || sentFallback || suppressSilentReplyFallback;
if (statusReactionController && !hasFinalResponse) {
void finalizeTelegramStatusReaction({ outcome: "error", hasFinalResponse: false }).catch(