[X] I have checked and am using the latest version of the library.
What type of session are you experiencing this issue on?
Legacy (Normal)
What type of host account are you experiencing this issue on?
Business account
Mode
My own code
Current Behavior
client.getUnreadMessages() returns a Message[] but it actually doesn't.
It actually seems to return a Chat[] and each chat has a Message[] called messages.
messages are all "unread"
Expected Behavior
client.getUnreadMessages() should return a Chat[] type.
- Starting
- Version: 4.28.13
- Initializing WA
- Launching Browser
Subscribed to ALL channels
- Setting Up Page
- Loading session data
- Found session data file: /home/bautista/Desktop/Beto/Beto-WAPP/data/tokens/beto-wapp-server-v4.data.json
- Existing session data detected. Injecting...
- Existing session data injected
- Navigating to WA
- Page loaded in 737ms: 200
- Browser Launched
- Debug info: {
"WA_VERSION": "2.2149.4",
"PAGE_UA": "WhatsApp/2.2147.16 Mozilla/5.0 (Macintosh; Intel Mac OS X 11_2_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36",
"WA_AUTOMATE_VERSION": "4.28.13",
"BROWSER_VERSION": "HeadlessChrome/93.0.4577.0",
"OS": "Linux 5.11",
"START_TS": 1642087626979
}
- Use this easy pre-filled link to report an issue: https://github.com/open-wa/wa-automate-nodejs/issues/new?template=bug_report.yaml&d_info=%7B%0A%20%20%22WA_VERSION%22:%20%222.2149.4%22,%0A%20%20%22WA_AUTOMATE_VERSION%22:%20%224.28.13%22,%0A%20%20%22BROWSER_VERSION%22:%20%22HeadlessChrome/93.0.4577.0%22,%0A%20%20%22START_TS%22:%201642087626979,%0A%20%20%22LATEST_VERSION%22:%20true,%0A%20%20%22CLI%22:%20false%0A%7D&enviro=-%20OS:%20Linux%205.11%0A-%20Node:%2017.3.1%0A-%20npm:%208.3.0&labels=Legacy
- Injecting api
- WAPI injected
- Authenticating
- Authenticated
- Reinjecting api
- WAPI Reinjected
- Checking if session is valid
- Searching for cached patch
- Found cached patch
- Cached patch loaded
- Downloading cached patches from https://cdn.openwa.dev/patches.json
- Client is ready
- Installing patches
- Patches Installed: CACHED-46c7b
- Client loaded for normal account with 944 contacts, 845 chats & 878 messages in 5.628s
- Finalizing web session...
- Finalizing client...
- Downloaded patches in 0.457s
- Saving patches to current working directory
- Saved patches to current working directory
- π @OPEN-WA ready for account: 3298
Are you using the latest version of the library?
What type of session are you experiencing this issue on?
Legacy (Normal)
What type of host account are you experiencing this issue on?
Business account
Mode
My own code
Current Behavior
client.getUnreadMessages()
returns aMessage[]
but it actually doesn't. It actually seems to return aChat[]
and each chat has aMessage[]
called messages.messages
are all "unread"Expected Behavior
client.getUnreadMessages()
should return aChat[]
type.Steps To Reproduce
create() code
DEBUG INFO
Environment
Screenshots/Logs
No response
Anything else?
No response