-
-
Notifications
You must be signed in to change notification settings - Fork 814
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add WhatsApp protocol support in Xabber #248
base: master
Are you sure you want to change the base?
Conversation
…tsApp protocol appears as a valid protocol with valid options.
Modified XMPP connection wrapping so we can implement a WhatsappConnection class under the Connection object.
Need to work with Roster class to properly handle all the functionality.
It seems that the packet parsing is not working properly :( Need to fix those errors
…send the auth packets. Need to add disconnect/auth failed callbacks to notify UI in case of wrong auth. Also need to signal the UI when the auth has finished and we are connected.
When auth fails it tries to reconnect (maybe I should fix this behavior). When auth is OK the UI does not get notified, which I don't know why.
Adding presence sending at startup. Adding ping/pong keepalive, seems that it is NOT working :(
Now the work must focus on adding contacts and sending/receiving messages properly.
Contacts are not retained across sessions and connection drops frequently. Receiving messages does not work yet :(
Now it's possible to send and receive messages using whatsapp. The stream keeps disconnecting though (probably due to not answering to some packets). Contact status (available / away) shown in the contact list. Next steps should be: Typing status + Permanently saving contacts.
Typing has issues. Fixed a bug with presence subscription.
Fixed a bug with the ACKing of received messages (same fix as in libpurple's whatsapp). Added Roster simulated reception, need to add something to add the contacts to the account.
Fixed some other bugs (still some bugs in the queue...) I'd consider this a beta version of the App.
Also fixed a small bug with user status.
Now it's possible to know the sending time of a message when you receive it after being offline.
Available and Chat statuses map to "online" whatsapp status, the rest map to "unavailable".
Temporary disabled status message pushing due to some bug causing stream-not-well-formed messages. Need to add "nickname" option in WhatsApp account settings so we can send our name to show in messages.
That is the name that will appear in the group chat.
Not working due to encryption issues (probably). Seems that the RC4 decoder or the key derivation is not working as it should. So, this is WIP!
Just discovered this amazing work... is there an existing WhatsApp java library or specification you based this on? Could we extract this out for other apps to use? |
Notice that the current status is not working. WA changed the protocol version and the updated version is not ready yet (I guess it's a small silly bug). I'm planning to port it to other apps :) |
On 02/23/2014 06:00 AM, David G. F. wrote:
Which was just taken down due to a DMCA request from WhatsApp. Grrr. |
Hi, we got the project to run through eclipse and so far we were able to get connected and receive the messages. But when a message is sent, it's not coming up on devices for example, on an iPhone with whatsapp installed. But the iPhone app sends the delivery acknowledgment and the app you developed is receiving that as well. Is this a known issue? Thanks and looking forward to hear from you soon. Regards, |
+1 |
WhatsApp uses Axolotl these days (for security), but I can't see any reference to that here... users of this client would silently force their conversations partners back into plaintext mode (via automatic fallback for backward compatibility with old client versions). |
Hello Александр!
Here it goes. Let me explain what I did to add the protocol:
As final notes. Everything is done by emulating XMPP protocol. When I want Xabber to update the UI I just create some XMPP Packet and send it to the packet listeners. It works great for chats, conferences, vcards...
If you need any extra clarification feel free to ask (you already have my email)
David