fix: use markSeen instead of sendSeen to fix markedUnread error (#5719)

Fixes TypeError: Cannot read properties of undefined (reading 'markedUnread')
that occurs in newer WhatsApp Web versions.

The sendSeen method was removed/changed in recent WhatsApp Web updates.
Using markSeen resolves the issue.

Fixes #5718

Co-authored-by: cp1797 <cp1797@users.noreply.github.com>
Co-authored-by: eltonnicolau <eltonnicolau@users.noreply.github.com>
Co-authored-by: telmedola <telmedola@users.noreply.github.com>
Co-authored-by: qw271862028 <qw271862028@users.noreply.github.com>
Co-authored-by: duola8789 <duola8789@users.noreply.github.com>
This commit is contained in:
Filipe 2026-01-19 10:54:31 -03:00 • committed by GitHub
commit dd9df4083a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -13,7 +13,7 @@ exports.LoadUtils = () => {
const chat = await window.WWebJS.getChat(chatId, { getAsModel: false });
if (chat) {
window.Store.WAWebStreamModel.Stream.markAvailable();
await window.Store.SendSeen.sendSeen(chat);
await window.Store.SendSeen.markSeen(chat);
window.Store.WAWebStreamModel.Stream.markUnavailable();
return true;
}