pedroslopez / whatsapp-web.js

A WhatsApp client library for NodeJS that connects through the WhatsApp Web browser app
https://wwebjs.dev
Apache License 2.0
14.53k stars 3.46k forks source link

Bug: Chat.isMuted returns undefined #2781

Open Zzombiee2361 opened 4 months ago

Zzombiee2361 commented 4 months ago

Is there an existing issue for this?

Describe the bug

I am unable to check whether a chat is muted or not since Chat.isMuted always returns undefined

Expected behavior

It should return boolean

Steps to Reproduce the Bug or Issue

Execute the code

Relevant Code

const client = new Client();

client.on('qr', (qr) => {
  console.log('QR RECEIVED', qr);
});

client.on('ready', () => {
  const chat = (await client.getChats())[0]
  console.log('is chat muted', chat.isMuted); // returns undefined
});

client.initialize();

Browser Type

Chromium

WhatsApp Account Type

Standard

Does your WhatsApp account have multidevice enabled?

Yes, I am using Multi Device

Environment

OS: Linux Phone OS: Android whatsapp-web.js version: 1.23.0 WhatsApp Web version: 2.2407.3 Node.js Version: v16.15.0

Additional context

No response

alechkos commented 4 months ago
const chat = await client.getChatById('XXXXXXXXXX@c.us');
console.log(chat.isMuted);
Zzombiee2361 commented 4 months ago

why is this closed? it does indeed returns undefined though

brtwrs commented 4 months ago

I have exactly the same problem. This issue should not be closed

renyale commented 4 months ago

The same thing has happened to me, since January 13th...

FalloNero commented 3 months ago

Yep chat.isMuted returns undefined :c

RAKESHSUVIDYA commented 1 month ago

QR is not working properly in ubuntu platform. Is there anyone who can help