Skip to content

Commit aa35f2e

Browse files
committed
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.
1 parent 64db980 commit aa35f2e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/hooks/session-recovery.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ function findEmptyContentMessageFromStorage(sessionID: string): string | null {
349349
return false
350350
})
351351

352-
if (!hasContent && parts.length > 0) {
352+
if (!hasContent) {
353353
return msg.id
354354
}
355355
}

0 commit comments

Comments
 (0)