Исправлен ReferenceError chatId в chat-view при отправке read-receipt

This commit is contained in:
AidarKC 2026-04-20 12:53:46 +03:00
parent cc59bd18ee
commit bec1d08757

View File

@ -193,12 +193,12 @@ export function render({ navigate, route }) {
}); });
renderLog(log, chatId); renderLog(log, chatId);
void sendReadReceiptsForVisible(); void sendReadReceiptsForVisible(chatId);
wrap.append(log, form); wrap.append(log, form);
screen.append(wrap); screen.append(wrap);
return screen; return screen;
} }
async function sendReadReceiptsForVisible() { async function sendReadReceiptsForVisible(chatId) {
const pending = getChatMessages(chatId) const pending = getChatMessages(chatId)
.filter((row) => row?.from === 'in' && Number(row?.messageType) === 1 && !row?.readReceiptSent) .filter((row) => row?.from === 'in' && Number(row?.messageType) === 1 && !row?.readReceiptSent)
.slice(0, 50); .slice(0, 50);