sigalor / whatsapp-web-reveng

Reverse engineering WhatsApp Web.
MIT License
6.15k stars 807 forks source link

How can I find my contact is online? #34

Open infahash opened 6 years ago

infahash commented 6 years ago

On whatsapp web I can find any person is online with below code.

Store.Precense.find("XXXXXXXXXX@c.us").then(function (d) { console.log(d.isOnline) })

but since few days it's not returning correct data until I open that contact's chat screen on my android. Can I do then same thing with this or there is an other way?

sigalor commented 6 years ago

At #11, someone mentioned that the rules for finding a contact's online status have been changed in the past few weeks. I haven't confirmed their statement yet though.

Apart from that, this project's main goal is not really to document the WhatsApp Web console API. I rather added it to the readme because it's a gentle introduction into how various messages (meta or actual) are sent via the websockets and further processed.

Anyway, it would certainly be nice if you would like to investigate this further and maybe even add your results to the readme eventually.

infahash commented 6 years ago

@karopass As I know all applications doing this service are down now. I search lot of applications on google play to see there in any way to get online/offline data. but nothing found. previously getting online/offline data through whatsapp web is a simple thing. but they changed it. So we have to find new way to do that.

infahash commented 6 years ago

@karopass Whatsapp web will no longer useful because we can't see online, last seen status of our contacts untill open chat screen on phone. So they must have to fix it. I have informed to whatsapp web team about this problem. But only got automatic reply.

wiomoc commented 6 years ago

With messageTag,["action", "presence", "subscribe", "49123456789@c.us"] over the websocketapi, you'll get an initial message about the current presence and subscribe to all future presence changes.

lelandolt commented 6 years ago

@wiomoc Could you please further explain that? How do I get to the websocketapi? Kind regards

infahash commented 6 years ago

@wiomoc Only initial message receiving. No responce for presence changes. It has blocked from their server.

@karopass It's not a command to run on console. It's the message that send from websocket to whatsapp server when subscribing presence update.

wiomoc commented 6 years ago

@infahash This is strange, I receive further presense changes.

lelandolt commented 6 years ago

@wiomoc Are you using Google Chrome? And could you please explain the steps, so that I can try it?

infahash commented 6 years ago

@wiomoc How you send the message. From whatsapp web on browser or from this repository.

Are you sure you receiving message when contact online\offline?

azharuddinkhan8898 commented 6 years ago

@wiomoc You are getting presence info for the contact which is stored in your contact or you have conversation with that number?

wiomoc commented 6 years ago

@infahash @klausweibel i'm currently developing my own client. But the code works the same as in this repository @azharuddinkhan8898 I get presense changes for every contact I subscribe to. @klausweibel sadly you couldn't do this via chrome.

azharuddinkhan8898 commented 6 years ago

@wiomoc So you are making this client on which platform?

wiomoc commented 6 years ago

@azharuddinkhan8898 https://github.com/wiomoc/whatsappweb-rs/

infahash commented 6 years ago

@wiomoc I tried with send message to whatsapp websocket with this repository. But only getting a responce with content "status:200". No responce on contact presence change. I have to open chat window on my phone to get available/unavailable responce.

wiomoc commented 6 years ago

@infahash I've just added an example to my repository https://github.com/wiomoc/whatsappweb-rs/blob/master/examples/presence.rs

infahash commented 6 years ago

@wiomoc Thanks! Getting error on login.

2018-07-02 05:56:43 INFO  [presence] new state: Connected
thread '<unnamed>' panicked at 'not yet implemented', src/node_wire.rs:436:22
note: Run with `RUST_BACKTRACE=1` for a backtrace.
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Any', libcore/result.rs:945:5

Anyway I'm new to RUST language and I would like to contribute to your repository.

kiusnga commented 6 years ago

Hello infahash ,i need your help. Please give your whatsapp contact or can you help me to fix sms verification with last whatsapp apk?

infahash commented 6 years ago

@kisunga I'm not sure. Have to check it. But I have no free time in these days.

kiusnga commented 6 years ago

OK ,Can i wait?

infahash commented 6 years ago

@kiusnga What version you have?

azharuddinkhan8898 commented 6 years ago

@infahash Is this repo is working for you? https://github.com/wiomoc/whatsappweb-rs/ Can you please help me?

infahash commented 6 years ago

@azharuddinkhan8898 working as normal whatsap web. presence subscribe working only for numbers with chat initialized. Whatsapp has changed it from their server. server response to presence subscribe only from android/ios app.

infahash commented 6 years ago

@azharuddinkhan8898 If you really need it I have a method that working for few numbers. But you need to have an (extra android phone + pc to connect whatsappweb) or (pc with android emulator installed)

azharuddinkhan8898 commented 6 years ago

@infahash Yes I need some way to make it work. Please tell me the alternative way with pc and emulator.

infahash commented 6 years ago

@azharuddinkhan8898 contact me whatsapp

midosoli commented 5 years ago

With messageTag,["action", "presence", "subscribe", "49123456789@c.us"] over the websocketapi, you'll get an initial message about the current presence and subscribe to all future presence changes.

Can you please tell me how to implement this on python ?

scotthumphris commented 4 years ago

On whatsapp web I can find any person is online with below code.

Store.Precense.find("XXXXXXXXXX@c.us").then(function (d) { console.log(d.isOnline) })

but since few days it's not returning correct data until I open that contact's chat screen on my android. Can I do then same thing with this or there is an other way?

On whatsapp web I can find any person is online with below code.

Store.Precense.find("XXXXXXXXXX@c.us").then(function (d) { console.log(d.isOnline) })

but since few days it's not returning correct data until I open that contact's chat screen on my android. Can I do then same thing with this or there is an other way?

Hey @infahas . I am trying to get in contact with you. You have sone some work for me on Fiverr before but your profile is no longer active. I need your help again!