Skip to content

Commit f21343b

Browse files
committed
fix(heartbeat): match message tool thread routes
1 parent 2beb0e8 commit f21343b

13 files changed

Lines changed: 1224 additions & 143 deletions

src/auto-reply/heartbeat-reply-payload.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,9 @@ export function resolveHeartbeatReplyPayload(
2626
export function hasHeartbeatMessageToolDeliveryEvidence(
2727
replyResult: ReplyPayload | ReplyPayload[] | undefined,
2828
): boolean {
29-
if (!replyResult) {
29+
const replyPayload = resolveHeartbeatReplyPayload(replyResult);
30+
if (!replyPayload) {
3031
return false;
3132
}
32-
const payloads = Array.isArray(replyResult) ? replyResult : [replyResult];
33-
return payloads.some(
34-
(payload) => getReplyPayloadMetadata(payload)?.messageToolDeliveredForReplyRoute === true,
35-
);
33+
return getReplyPayloadMetadata(replyPayload)?.messageToolDeliveredForReplyRoute === true;
3634
}

0 commit comments

Comments
 (0)