mukulhase / WebWhatsapp-Wrapper

An API for sending and receiving messages over web.whatsapp [Working as of 18th May 2018]
https://webwhatsapi.readthedocs.io/en/latest/
MIT License
2.04k stars 795 forks source link

how to get chatID or number which is opened by user on run time #1125

Open abdualRehman opened 2 years ago

abdualRehman commented 2 years ago

Hello, Team! Is there a built-in method that can tell you which chat id the user is now seeing?

alexeykirichek commented 2 years ago

If you have already opened a chat, then you know its ID? Can you describe the problem in more detail?

erm3nda commented 2 years ago

@alexeykirichek Seems OP wants to know what chat is being viewed by the "user" in the web interface that is operated by webwhatsapi. Maybe to gather info, who knows.

As far as I remember, yes. I was able in the past to know which chat where opened. I think that property was hasChatBeenOpened, which now remains False no matter what you do.

Since multidevice, or even earlier, both chatstates and others where modified or removed, and I think that the function to know wich panel is open flew away also.

Im sure that is still possible, but right now I don't have such information. I'll post back when I found it or when other kindly person shares his knowledge here.