From aa35f2eab699da82b75f0f0c82bdd9fd8a1671ca Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Mon, 8 Dec 2025 11:03:21 +0900 Subject: [PATCH] fix(session-recovery): detect empty messages with zero parts Previously, findEmptyContentMessageFromStorage only detected messages with parts.length > 0 that had no content. This missed the case where a message has zero parts entirely, causing infinite recovery loops. --- src/hooks/session-recovery.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hooks/session-recovery.ts b/src/hooks/session-recovery.ts index 7de6842..0dd268d 100644 --- a/src/hooks/session-recovery.ts +++ b/src/hooks/session-recovery.ts @@ -349,7 +349,7 @@ function findEmptyContentMessageFromStorage(sessionID: string): string | null { return false }) - if (!hasContent && parts.length > 0) { + if (!hasContent) { return msg.id } }