mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-09-20 16:54:15 +01:00
Fix duplicate messages at backup page boundaries
This commit is contained in:
@@ -9186,7 +9186,8 @@ function pageBackupMessages(
|
||||
${MESSAGE_COLUMNS_FRAGMENT}
|
||||
FROM messages
|
||||
WHERE
|
||||
rowid >= ${cursor?.nextRowid ?? 0}
|
||||
rowid > ${cursor?.lastRowId ?? 0}
|
||||
ORDER BY rowid ASC
|
||||
LIMIT ${LIMIT}
|
||||
`;
|
||||
const rows: Array<MessageTypeUnhydrated & { rowid: number }> = db
|
||||
@@ -9194,7 +9195,7 @@ function pageBackupMessages(
|
||||
.all(params);
|
||||
return {
|
||||
cursor: {
|
||||
nextRowid: rows.at(-1)?.rowid ?? 0,
|
||||
lastRowId: rows.at(-1)?.rowid ?? 0,
|
||||
done: rows.length < LIMIT,
|
||||
} as PageBackupMessagesCursorType,
|
||||
messages: hydrateMessages(db, rows),
|
||||
|
||||
Reference in New Issue
Block a user