Open
Description
Is there an existing issue for this?
- I have searched the existing issues.
Is this a problem caused by your code, or is it specifically because of the library?
- I have double-checked my code carefully.
Describe the bug.
When WhatsApp Web sends a call_log
update, the raw payload often does not include the isNewMsg
field. Because whatsapp-web.js currently does:
if (msg.isNewMsg) {
...
}
node_modules/whatsapp-web.js/src/Client.js:701
all call_log
messages are silently ignored and never emitted as high-level message
events.
Expected Behavior
call_log
messages should be emitted when received, even if isNewMsg
is undefined. Call-log notifications (missed or received calls) are legitimate “new” events and should not be filtered out.
Steps to Reproduce the Bug or Issue
- Use LocalAuth (or your chosen auth strategy) and instantiate a
Client
. - Place or miss a call to the WhatsApp number—this generates a
call_log
update. - Observe in your debugger that the raw event payload has
type === 'call_log'
but noisNewMsg
property. - Notice your
message
listener is never called for call logs.
WhatsApp Account Type
Standard
Browser Type
Chromium
Operation System Type
Linux
Phone OS Type
Android
WhatsApp-Web.js Version
v1.28.0
WhatsApp Web Version
2.3000.1023186384
Node.js Version
20.18.1
Authentication Strategy
LocalAuth
Additional Context
Call logs are functionally "new messages" (notifications), so the isNewMsg check is overly strict. A fix could:
Default isNewMsg to true for call_log types, or
Skip the check entirely for call logs.