Closed mxhryvo closed 5 months ago
This could work if we set the puppeteer window to not actively selected / in foreground
This could work if we set the puppeteer window to not actively selected / in foreground
Tested that, but you will be available even when immediately switching to another tab or minimizing the entire browser. Not sure if this is even possible to implement.
Is there an existing issue for this?
Describe the bug
I am not able use the client in incognito mode, meaning that the client or user stays offline/unavailable and thus not updates the "Last seen online:" timestamp. (I know that baileys client offers a way to do this)
When I run the script below, the user stays offline until the 100% of the loading screen state is reached, and then goes online for less than a second and then offline again (probably because of sending the "unavailable" state).
Is it possible to use the client without appearing online at all (if explicitly wanted). Or is there an earlier state to use
client.sendPresenceUnavailable()
and thus prevent going online?When is the client automatically sending an "available" state and can this be disabled potentially?
This would enable use cases where the bot/user should not leave the impression to have been active/available, basically for any READ actions, e.g. if some data (e.g. chats/contacts etc.) should be fetched or media downloaded etc.
Expected behavior
I expect that I am able to not send an "available" state at all and thus not change the account's "last online ..." state (this seems to be possible with Baileys for example), especially If I explicitly use the
client.sendPresenceUnavailable()
method after client is ready.Steps to Reproduce the Bug or Issue
(Assuming first time authentication is done)
Relevant Code
Browser Type
Chromium
WhatsApp Account Type
Standard
Does your WhatsApp account have multidevice enabled?
Yes, I am using Multi Device
Environment
Additional context
No response