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.
This commit is contained in:
@@ -349,7 +349,7 @@ function findEmptyContentMessageFromStorage(sessionID: string): string | null {
|
|||||||
return false
|
return false
|
||||||
})
|
})
|
||||||
|
|
||||||
if (!hasContent && parts.length > 0) {
|
if (!hasContent) {
|
||||||
return msg.id
|
return msg.id
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user