Вот моя основная логика обработки сообщений. Как видите, я включил несколько проверок, чтобы исключить обновления статуса, но ни одна из них не работает.
Код: Выделить всё
client.on('message', async (msg) => {
// Ignore messages if client isn't ready, from the bot itself, or from a group:
if (!isReady || msg.fromMe || msg.isGroup) return;
// Ignore non-chat message types (status updates, calls, sys msgs, etc.):
const ignoredTypes = ['status_v3', 'e2e_notification', 'notification_c', 'call_log', 'revoked', 'chatstate'];
if (ignoredTypes.includes(msg.type)) {
return;
}
const chatId = msg.from;
try {
// THIS BLOCK CONTAINS MAIN MESSAGE HANDLER ...
}
});
Подробнее здесь: https://stackoverflow.com/questions/798 ... app-web-js
Мобильная версия