Author Topic: WhatsApp protocol  (Read 591690 times)

0 Members and 7 Guests are viewing this topic.

Offline Wishmaster

Re: WhatsApp protocol
« Reply #600 on: 24 07 2015, 10:16:24 »
I'd like to contribute a bit to the code adding/improving a thing here and there.
This is welcome :)



Should I make a pull request on the github repo  for such things (this appears to be rarely updated) or how does it work here? :D
You can checkout the SVN and provide a patch here. It's much easier to merge, sinse the github is read-only.
 

Offline watcher

Re: WhatsApp protocol
« Reply #601 on: 24 07 2015, 10:16:54 »
Cassio, svn patch.
Пожалуйста, внимательно прочтите правила постинга перед тем, как открыть новую тему.
Please read forum rules.
 

Offline watcher

Re: WhatsApp protocol
« Reply #602 on: 24 07 2015, 10:38:01 »
Whatsup in stable branch was also updated to new working build, check for updates.
Пожалуйста, внимательно прочтите правила постинга перед тем, как открыть новую тему.
Please read forum rules.
 

Offline Cassio

Re: WhatsApp protocol
« Reply #603 on: 24 07 2015, 10:57:56 »
Alright svn patch it is then! :D
I'm not a C/++ programmer but I'm trying my best here.

The first one was requested by a few users and I myself prefer to use it:
It adds an option to use remote message timestamps instead of local receival timestamps. (default=local=current behavior)
However enabling this option may cause messages to get displayed out of order.

The second forces user avatars to be refreshed when opening a user profile and subscribes to their presence.
This works around the problem of avatars not being refreshed correctly and allows one to see when someone comes online.
Opening the user profil is probably not the best place for call these functions but it's better than nothing. :)

Let me know what you think.

Btw: *.patch files cannot be uploaded here, so i changed them to *.txt.
« Last Edit: 24 07 2015, 11:16:54 by Cassio »
 

Offline Wishmaster

Re: WhatsApp protocol
« Reply #604 on: 24 07 2015, 11:49:22 »
It looks good, I'll look at it  :)
 

Offline Kajuru

Re: WhatsApp protocol
« Reply #605 on: 24 07 2015, 13:44:06 »
Whatsup in stable branch was also updated to new working build, check for updates.

What about dev build not receiving messages? Will be on next build?

Im using androidx86 inside Virtualbox in the meantime, since a few friends complained i was not answering their messages, but keeping miranda open to catch-up on any update.
 

Offline Kajuru

Re: WhatsApp protocol
« Reply #606 on: 24 07 2015, 17:16:58 »
Netlog of chat with one of my contacts. She did reply, but nothing on msg window or popup, just the typing notification.

 

Offline Cassio

Re: WhatsApp protocol
« Reply #607 on: 24 07 2015, 17:29:02 »
Looks like you are getting encrypted messages which is not yet implememted here.
Have you been using the android app before this occured happening?

Maybe try to reregister using the plugin and see if that helps.
 

Offline Kajuru

Re: WhatsApp protocol
« Reply #608 on: 24 07 2015, 17:36:37 »
I tried, just for that test, was using androidx86, but that behaviour is happening ever since the last login fix, when I used miranda exclusively.

Add: downloaded openssl from pluginupdater, but that didnt help either, still getting <enc type="pkmsg" v="1"> , im supposedly getting the msg but miranda doesnt know what to do with it.
« Last Edit: 24 07 2015, 17:46:49 by Kajuru »
 

Offline Wishmaster

Re: WhatsApp protocol
« Reply #609 on: 25 07 2015, 14:09:30 »
Cassio, applied in r14684. Thanks :)
 

Offline Robyer

Re: WhatsApp protocol
« Reply #610 on: 25 07 2015, 20:27:36 »
The first one was requested by a few users and I myself prefer to use it:It adds an option to use remote message timestamps instead of local receival timestamps. (default=local=current behavior)However enabling this option may cause messages to get displayed out of order.

I have a working solution for this "timestamp hell" problem in Facebook plugin. I'm using server time for received AND sent messages (which is correct behavior, without any options for local/server time) which means they won't be reordered.  :)
I wonder why devs of other protocols (VK, Skype, WhatsApp...) aren't using it this way too... ???  (I can explain solution in a more detail if needed)
I was developing mainly Facebook, Omegle, Steam, Dummy and MobileState plugins. Now I'm retired. Goodbye, everyone. ~ You can still find me on Facebook.
 

Offline Chungalin

  • Jr. Member
  • **
  • Posts: 63
  • Country: es
Re: WhatsApp protocol
« Reply #611 on: 26 07 2015, 10:37:39 »
As a source of inspiration, it’s possible to peek at WhatsApp Web JS source code:

https://web.whatsapp.com/app_5d075de7d4ccd5536c44.js
https://web.whatsapp.com/crypto_083f5e73bd8a56aa711c.js

It’s obfuscated, but one can get some insight after processing it with some JS beautifier. The protocol is all there.
 

Offline KtW

  • Newbie
  • *
  • Posts: 5
Re: WhatsApp protocol
« Reply #612 on: 27 07 2015, 23:05:24 »
Adding OnlineNotify Functions...

http://moreinfo.thebigboss.org/moreinfo/depiction.php?file=onlinenotifyDp

It's A Cydia Tweak That Can Show Some Free Public Available Infos About Your Contacts
Even If They Have Disabled Some Functions Like "last online"...

You Know That When A User Goes "Online" Whatsapp Write The Online
Word Under The Name... :)

It Will Be Nice That Miranda In Contact List Can Write This Information Too Under The
Name Of The Contact And A Green Icon Over The Avatar When The Usere Is Online...
GrayedOut When He Have Disabled The "Last Online" Information And No Icon When Is
Offline...

Also Ability To Don't Have A Second Phone Number To Use It... Like It's Possible For
Every Platform Using The web.whatsapp.com Escluding The IOS One...

Later And Keep Up Great Work!  :THUMBS UP:
 

Offline Ducados

Re: WhatsApp protocol
« Reply #613 on: 30 07 2015, 06:46:15 »
Weird stuff on my side.

I can send messages (which my partner can read), but I can't receive any.

I get the message "user is typing..." in the status bar (scriver) and in the log I guess I can see that the message arrives to Miranda:

Quote
[8:36:17 30C4] [WhatsApp_1] XML received
<message from="phonenumber@s.whatsapp.net" id="id" notify="name" offline="0" t=
"1438238035" type="text">
<enc type="pkmsg" v="1">
3Ç!â-_w<t8û­|ú¼ßúmore garbled stuff›ÙDŸ˜ÄØ„*(\.‘Þ¨¼v¬¼iЂAŠÄËr"B3
!X¤’qmS ¹ÉÄ

The same message arrives several times with an increasing number in the final part of the id (-15, -16, -17...), but nothing is displayed in my chat window except my own messages. My partner says she gets a gray double tick on the messages she sends to me, but not the blue double tick that confirms that I've received the message.

I've re-regged, but that didn't work.

BTW, is there a way to force re-registration on Miranda? I normally use the phone to deregister Miranda, but do that a couple of times and WA refuses to send the sms for a lot of hours.

Using stable, BTW.

EDIT: Tested with development version. Same thing.
« Last Edit: 30 07 2015, 09:31:40 by Ducados »
 

Offline Cassio

Re:WhatsApp protocol
« Reply #614 on: 30 07 2015, 12:51:55 »
@Kajuru & Ducados

Could you please test what happens using the attached plugin build?
I don't have contacts sending me encrypted messages and thus cannot really test that.
It should show that an ciphered messages was received in the message window + the other contact should get no received checkmarks for their message.

(use at your own risk and revert back to the development version after testing)
« Last Edit: 31 07 2015, 09:53:34 by Cassio »