НЕ ПРОВЕРЕНО: откат DM-вложений, оставлены ревизии и удаление

This commit is contained in:
AidarKC
2026-06-18 12:24:14 +04:00
parent 92fd315505
commit a95bd245cf
23 changed files with 309 additions and 1267 deletions
-4
View File
@@ -384,7 +384,6 @@ function persistMessageRecord(chatId, row) {
secondTick: Boolean(row.secondTick),
readReceiptSent: Boolean(row.readReceiptSent),
refBaseKey: String(row.refBaseKey || ''),
attachments: Array.isArray(row.attachments) ? row.attachments : [],
ts: resolvedTs > 0 ? resolvedTs : Date.now(),
}).catch(() => {});
}
@@ -420,7 +419,6 @@ export async function hydrateMessagesFromStore() {
secondTick: Boolean(row.secondTick),
readReceiptSent: Boolean(row.readReceiptSent),
refBaseKey: String(row.refBaseKey || ''),
attachments: Array.isArray(row.attachments) ? row.attachments : [],
createdAtMs: Number(row.ts || 0),
});
});
@@ -575,7 +573,6 @@ export function addSignedMessageToChat({
rawBlobB64 = '',
refBaseKey = '',
revisionTimeMs = 0,
attachments = [],
deleted = false,
} = {}) {
const id = String(messageKey || '').trim();
@@ -603,7 +600,6 @@ export function addSignedMessageToChat({
row.messageType = Number(messageType || 0);
row.rawBlobB64 = String(rawBlobB64 || '');
row.revisionTimeMs = Number(revisionTimeMs || 0);
row.attachments = Array.isArray(attachments) ? attachments : [];
row.unread = row.from === 'in' ? Boolean(unread) : false;
row.refBaseKey = String(refBaseKey || '');
row.firstTick = row.from === 'out';