whatsapp-http-api
whatsapp-http-api copied to clipboard
[BUG][NOWEB] - When using "Get chat presence" feature , sometimes get null value for last seen
When using "Get chat presence" feature(GET /api/{session}/presence/) , sometimes get null value for lastseen,and sometimes it returns a valid number.Why this happened? Is there anyone who could explain it? Any response will be greatly appreciated!
Version
{
"version": "2023.12.1",
"engine": "NOWEB",
"tier": "CORE",
"browser": "/usr/bin/chromium"
}
To Reproduce Steps to reproduce the behavior:
- start a session,scan qr code to login
- call GET /api/default/presence/[email protected]
- sometimes get null value for last seen, sometimes do not.
Expected behavior
get a valid number for last seen
Engine
I'm using NOWEB engine.
Requests - Responses
http://localhost:3001/api/default/presence/[email protected]
{ "id": "[email protected]", "presences": [ { "participant": "[email protected]", "lastKnownPresence": "offline", "lastSeen": null } ] } Docker Logs
Collect and attach related docker logs if you have any https://waha.devlike.pro/docs/how-to/deploy/#viewing-the-logs
Screenshots
Additional context
Add any other context about the problem here.
Hi! Are all requirements satisfied? From https://faq.whatsapp.com/419827870318306
There are a few reasons why you might not be able to see someone's last seen or online:
- They might have set their privacy settings to hide this information.
- You might have set your privacy settings to not share your last seen. If you don't share your last seen, you can't see other contacts' last seen.
- You might have been blocked.
- You might not have chatted with them before.
- They might not have you saved as a contact.
- You might not have them saved as a contact.
Have you subscribed first? https://waha.devlike.pro/docs/how-to/presence/#subscribe-to-presence
Last seen will be updated only when the client (the session) actually sees the participant online.
So if you request that information right after you session started - it can be null
, totally fine. But if the session sees that person online - it remembers the last time in lastSeen
field.
No way to get that information for person who the session never seen online (but before to subscribe https://waha.devlike.pro/docs/how-to/presence/#subscribe-to-presence)
Hi! Are all requirements satisfied? From https://faq.whatsapp.com/419827870318306
There are a few reasons why you might not be able to see someone's last seen or online:
- They might have set their privacy settings to hide this information.
- You might have set your privacy settings to not share your last seen. If you don't share your last seen, you can't see other contacts' last seen.
- You might have been blocked.
- You might not have chatted with them before.
- They might not have you saved as a contact.
- You might not have them saved as a contact.
Have you subscribed first? https://waha.devlike.pro/docs/how-to/presence/#subscribe-to-presence Last seen will be updated only when the client (the session) actually sees the participant online. So if you request that information right after you session started - it can be
null
, totally fine. But if the session sees that person online - it remembers the last time inlastSeen
field. No way to get that information for person who the session never seen online (but before to subscribe https://waha.devlike.pro/docs/how-to/presence/#subscribe-to-presence)
Thanks a lot! I will do more test on this.