SHA256
наверное работает
This commit is contained in:
@@ -348,6 +348,37 @@ export function markOutgoingReadByBaseKey(baseKey) {
|
||||
});
|
||||
}
|
||||
|
||||
export function markIncomingReadByBaseKey(baseKey) {
|
||||
if (!baseKey) return;
|
||||
const keys = Object.keys(state.chats || {});
|
||||
keys.forEach((chatId) => {
|
||||
const list = getChatMessages(chatId);
|
||||
list.forEach((row) => {
|
||||
if (row?.from !== 'in') return;
|
||||
if (row.baseKey === baseKey) {
|
||||
row.unread = false;
|
||||
row.readReceiptSent = true;
|
||||
persistMessageRecord(chatId, row);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
export function markReadReceiptSentByBaseKey(baseKey) {
|
||||
if (!baseKey) return;
|
||||
const keys = Object.keys(state.chats || {});
|
||||
keys.forEach((chatId) => {
|
||||
const list = getChatMessages(chatId);
|
||||
list.forEach((row) => {
|
||||
if (row?.from !== 'in') return;
|
||||
if (row.baseKey === baseKey) {
|
||||
row.readReceiptSent = true;
|
||||
persistMessageRecord(chatId, row);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
export function addSignedMessageToChat({
|
||||
chatId,
|
||||
messageKey,
|
||||
|
||||
Reference in New Issue
Block a user