Сохранить текущий снимок DM-синхронизации

This commit is contained in:
AidarKC
2026-08-24 17:50:36 +04:00
parent 015fade4c0
commit d8e0c77951
48 changed files with 2498 additions and 383 deletions
+12
View File
@@ -43,6 +43,7 @@ import {
deleteConversationMessagesBefore,
deleteSignedMessageByBaseKey,
markIncomingReadByBaseKey,
markOutgoingDeliveryState,
markOutgoingReadByBaseKey,
normalizeDmChatId,
setContacts,
@@ -1390,6 +1391,17 @@ async function init() {
});
});
authService.onEvent('DmDeliveryStateChanged', (evt) => {
const payload = evt?.payload || {};
const changed = markOutgoingDeliveryState({
outgoingKey: payload.outgoingKey,
baseKey: payload.baseKey,
deliveryState: payload.deliveryState,
});
if (!changed) return;
window.dispatchEvent(new CustomEvent('shine-dm-delivery-updated', { detail: payload }));
});
authService.onEvent('SignedMessageArrived', async (evt) => {
const payload = evt?.payload || {};
const messageKey = String(payload.messageKey || '').trim();