SHA256
наверное работает
This commit is contained in:
+11
-6
@@ -16,6 +16,7 @@ import {
|
||||
state,
|
||||
terminateCurrentSession,
|
||||
addSignedMessageToChat,
|
||||
markIncomingReadByBaseKey,
|
||||
markOutgoingReadByBaseKey,
|
||||
setContacts,
|
||||
} from './state.js';
|
||||
@@ -398,16 +399,20 @@ async function init() {
|
||||
} catch {}
|
||||
}
|
||||
} else if (messageType === 3 || messageType === 4) {
|
||||
const refBaseKey = String(payload.receiptRefBaseKey || '').trim();
|
||||
if (refBaseKey) {
|
||||
markOutgoingReadByBaseKey(refBaseKey);
|
||||
} else {
|
||||
let refBaseKey = String(payload.receiptRefBaseKey || '').trim();
|
||||
if (!refBaseKey) {
|
||||
try {
|
||||
const ref = authService.parseReadReceiptPayload(parsed.payloadBytes);
|
||||
const fallbackRefBase = `${ref.refFromLogin}|${ref.refToLogin}|${ref.refTimeMs}|${ref.refNonce}`;
|
||||
markOutgoingReadByBaseKey(fallbackRefBase);
|
||||
refBaseKey = `${ref.refFromLogin}|${ref.refToLogin}|${ref.refTimeMs}|${ref.refNonce}`;
|
||||
} catch {}
|
||||
}
|
||||
if (refBaseKey) {
|
||||
if (messageType === 3) {
|
||||
markOutgoingReadByBaseKey(refBaseKey);
|
||||
} else {
|
||||
markIncomingReadByBaseKey(refBaseKey);
|
||||
}
|
||||
}
|
||||
addAppLogEntry({
|
||||
level: 'info',
|
||||
source: 'signed-dm',
|
||||
|
||||
Reference in New Issue
Block a user