Git Product home page Git Product logo

transwhat's Introduction

transWhat

transWhat is a WhatsApp XMPP Gateway based on Spectrum 2 and Yowsup 2.

Support

For support and discussions please join the XMPP MUC: [email protected].

Features

  • Typing notifications
  • Receive images, audio & video
  • Set/get online status
  • Set status message
  • Groupchats

Installation

transWhat requires a running and configured XMPP server. Detailed instructions can be found on the Installation page.

Users find details on the Usage page.

Branches

  • yowsup-1 My original version which is based on @tgalal first Yowsup version (deprecated and broken).
  • yowsup-2 Major rewrite from @moyamo for @tgalal’s new Yowsup 2 (recommended).

For production, please use the yowsup-2 branch.

Contributors

Pull requests, bug reports etc. are welcome. Help us to provide a open implementation of the WhatsApp protocol.

The following persons have contributed major parts of this code:

  • @stv0g (Steffen Vogel): Idea and initial implementation based on Yowsup 1
  • @moyamo (Mohammed Yaseen Mowzer): Port to Yowsup 2
  • @DaZZZl: Improvements to group chats, media & message receipts

License

transWhat is licensed under the GPLv3 license.

  • An outdated project wiki is available here.
  • An outdated writeup of this project is also availabe at my blog.

transwhat's People

Contributors

dazzzl avatar git-o-bot avatar kiv1n avatar languitar avatar moyamo avatar neobelerophon avatar rigid avatar stv0g avatar vitalyster avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

transwhat's Issues

Send MUC feature to Spectrum

The result from the discussion with HanzZ on Spectrum MUC:

Problem: no Transwhat MUC support in Gjaim

Possible Solution: send feature muc=true also inside this message to Spectrum:
plugin.handleBackendConfig('features', 'send_buddies_on_login', 1)

d4a0593 seems to break groupchat

With d4a0593 I get the following error when I receive a message.

2016-01-05 13:08:07,260 ERROR transwhat: Traceback (most recent call last):
  File "/home/transwarp/transwhat/transwhat.py", line 88, in <module>
    asyncore.loop(timeout=1.0, count=10, use_poll = True)
  File "/usr/lib/python2.7/asyncore.py", line 220, in loop
    poll_fun(timeout, map)
  File "/usr/lib/python2.7/asyncore.py", line 201, in poll2
    readwrite(obj, flags)
  File "/usr/lib/python2.7/asyncore.py", line 123, in readwrite
    obj.handle_error()
  File "/usr/lib/python2.7/asyncore.py", line 108, in readwrite
    obj.handle_read_event()
  File "/usr/lib/python2.7/asyncore.py", line 449, in handle_read_event
    self.handle_read()
  File "/home/transwarp/python/local/lib/python2.7/site-packages/yowsup/layers/network/layer.py", line 86, in handle_read
    self.receive(data)
  File "/home/transwarp/python/local/lib/python2.7/site-packages/yowsup/layers/network/layer.py", line 94, in receive
    self.toUpper(data)
  File "/home/transwarp/python/local/lib/python2.7/site-packages/yowsup/layers/__init__.py", line 59, in toUpper
    self.__upper.receive(data)
  File "/home/transwarp/python/local/lib/python2.7/site-packages/yowsup/layers/stanzaregulator/layer.py", line 28, in receive
    self.processReceived()
  File "/home/transwarp/python/local/lib/python2.7/site-packages/yowsup/layers/stanzaregulator/layer.py", line 48, in processReceived
    self.toUpper(oneMessageData)
  File "/home/transwarp/python/local/lib/python2.7/site-packages/yowsup/layers/__init__.py", line 59, in toUpper
    self.__upper.receive(data)
  File "/home/transwarp/python/local/lib/python2.7/site-packages/yowsup/layers/auth/layer_crypt.py", line 63, in receive
    self.toUpper(payload)
  File "/home/transwarp/python/local/lib/python2.7/site-packages/yowsup/layers/__init__.py", line 59, in toUpper
    self.__upper.receive(data)
  File "/home/transwarp/python/local/lib/python2.7/site-packages/yowsup/layers/coder/layer.py", line 35, in receive
    self.toUpper(node)
  File "/home/transwarp/python/local/lib/python2.7/site-packages/yowsup/layers/__init__.py", line 59, in toUpper
    self.__upper.receive(data)
  File "/home/transwarp/python/local/lib/python2.7/site-packages/yowsup/layers/axolotl/layer.py", line 117, in receive
    self.onMessage(protocolTreeNode)
  File "/home/transwarp/python/local/lib/python2.7/site-packages/yowsup/layers/axolotl/layer.py", line 141, in onMessage
    self.toUpper(protocolTreeNode)
  File "/home/transwarp/python/local/lib/python2.7/site-packages/yowsup/layers/__init__.py", line 59, in toUpper
    self.__upper.receive(data)
  File "/home/transwarp/python/local/lib/python2.7/site-packages/yowsup/layers/__init__.py", line 169, in receive
    s.receive(data)
  File "/home/transwarp/python/local/lib/python2.7/site-packages/yowsup/layers/__init__.py", line 105, in receive
    recv(node)
  File "/home/transwarp/python/local/lib/python2.7/site-packages/yowsup/layers/protocol_messages/layer.py", line 21, in recvMessageStanza
    self.toUpper(entity)
  File "/home/transwarp/python/local/lib/python2.7/site-packages/yowsup/layers/__init__.py", line 59, in toUpper
    self.__upper.receive(data)
  File "/home/transwarp/python/local/lib/python2.7/site-packages/yowsup/layers/interface/interface.py", line 98, in receive
    self.callbacks[entityType](entity)
  File "/home/transwarp/transwhat/yowsupwrapper.py", line 655, in onMessageReceived
    entity.body
  File "/home/transwarp/transwhat/session.py", line 285, in onTextMessage
    timestamp, notify)
  File "/home/transwarp/transwhat/session.py", line 662, in sendGroupMessageToXMPP
    if defaultname != "" and group.participants[number].nick == number:
AttributeError: 'unicode' object has no attribute 'nick'

With the previous commit I don't have this problem.

AuthError: not-authorized

Guys can anybody advice how to resolve that issue from the backend ?

2016-04-22 18:30:00,661 INFO Session: Created: 7964705XXXX
2016-04-22 18:30:00,662 INFO Session: [email protected] attempting login
2016-04-22 18:30:02,240 ERROR transwhat: Traceback (most recent call last):
  File "/opt/transwhat/transwhat.py", line 94, in 
    asyncore.loop(timeout=1.0, count=10, use_poll = True)
  File "/usr/lib/python2.7/asyncore.py", line 220, in loop
    poll_fun(timeout, map)
  File "/usr/lib/python2.7/asyncore.py", line 201, in poll2
    readwrite(obj, flags)
  File "/usr/lib/python2.7/asyncore.py", line 123, in readwrite
    obj.handle_error()
  File "/usr/lib/python2.7/asyncore.py", line 108, in readwrite
    obj.handle_read_event()
  File "/usr/lib/python2.7/asyncore.py", line 449, in handle_read_event
    self.handle_read()
  File "/opt/transwhat/yowsup/layers/network/layer.py", line 88, in handle_read
    self.receive(data)
  File "/opt/transwhat/yowsup/layers/network/layer.py", line 96, in receive
    self.toUpper(data)
  File "/opt/transwhat/yowsup/layers/__init__.py", line 75, in toUpper
    self.__upper.receive(data)
  File "/opt/transwhat/yowsup/layers/stanzaregulator/layer.py", line 29, in receive
    self.processReceived()
  File "/opt/transwhat/yowsup/layers/stanzaregulator/layer.py", line 49, in processReceived
    self.toUpper(oneMessageData)
  File "/opt/transwhat/yowsup/layers/__init__.py", line 75, in toUpper
    self.__upper.receive(data)
  File "/opt/transwhat/yowsup/layers/auth/layer_crypt.py", line 65, in receive
    self.toUpper(payload)
  File "/opt/transwhat/yowsup/layers/__init__.py", line 75, in toUpper
    self.__upper.receive(data)
  File "/opt/transwhat/yowsup/layers/coder/layer.py", line 35, in receive
    self.toUpper(node)
  File "/opt/transwhat/yowsup/layers/__init__.py", line 75, in toUpper
    self.__upper.receive(data)
  File "/opt/transwhat/yowsup/layers/axolotl/layer.py", line 133, in receive
    self.toUpper(protocolTreeNode)
  File "/opt/transwhat/yowsup/layers/__init__.py", line 75, in toUpper
    self.__upper.receive(data)
  File "/opt/transwhat/yowsup/layers/__init__.py", line 188, in receive
    s.receive(data)
  File "/opt/transwhat/yowsup/layers/__init__.py", line 124, in receive
    recv(node)
  File "/opt/transwhat/yowsup/layers/auth/layer_authentication.py", line 78, in handleFailure
    raise AuthError(nodeEntity.getReason())
AuthError: not-authorized

At my frontend which is xmpp (pidgin) get the following
(19:09:53) whatsapp.xmpp.mysender.ru: Internal Server Error, please reconnect.

And log of spectrum2.log during that session

2016-04-22 19:09:31,158 INFO  NetworkPluginServer: New backend 0x1e4cc50 connected. Current backend count=1
2016-04-22 19:09:31,158 INFO  NetworkPluginServer: PING to 0x1e4cc50 (ID=)
2016-04-22 19:09:31,159 INFO  NetworkPluginServer: Associating [email protected] with this backend
2016-04-22 19:09:44,792 INFO  NetworkPluginServer: Backend 0x1e4cc50 (ID=32347) disconnected. Current backend count=0
2016-04-22 19:09:44,792 ERROR NetworkPluginServer: Backend 0x1e4cc50 (ID=32347) disconnected (probably crashed) with active user [email protected]
2016-04-22 19:09:44,792 INFO  User: [email protected]: Disconnecting from legacy network Internal Server Error, please reconnect., trying to reconnect automatically.
2016-04-22 19:09:44,793 INFO  NetworkPluginServer: Starting new backend /opt/transwhat/transwhat.py --host localhost --port 32710 --service.backend_id=2 "-j" "whatsapp.xmpp.mysender.ru" "/etc/spectrum2/transports/whatsapp.cfg" 
2016-04-22 19:09:44,794 INFO  NetworkPluginServer: There is no backend to handle user [email protected]. Adding him to queue.
2016-04-22 19:09:45,812 INFO  NetworkPluginServer: New backend 0x1e4cc50 connected. Current backend count=1
2016-04-22 19:09:45,812 INFO  NetworkPluginServer: PING to 0x1e4cc50 (ID=)
2016-04-22 19:09:45,814 INFO  NetworkPluginServer: Associating [email protected] with this backend
2016-04-22 19:09:50,711 INFO  NetworkPluginServer: Sending PING to backends
2016-04-22 19:09:50,711 INFO  NetworkPluginServer: PING to 0x1e4cc50 (ID=32348)
2016-04-22 19:09:55,758 INFO  NetworkPluginServer: Backend 0x1e4cc50 (ID=32348) disconnected. Current backend count=0
2016-04-22 19:09:55,758 ERROR NetworkPluginServer: Backend 0x1e4cc50 (ID=32348) disconnected (probably crashed) with active user [email protected]
2016-04-22 19:09:55,758 INFO  User: [email protected]: Disconnected from legacy network with error Internal Server Error, please reconnect.
2016-04-22 19:09:55,759 INFO  Component.RAW: RAW DATA OUT Internal Server Error, please reconnect.CONNECTION_ERROR_NETWORK_ERROR
2016-04-22 19:09:55,881 INFO  UserManager: [email protected]: Disconnecting user
2016-04-22 19:09:55,881 INFO  User: [email protected]: Destroying
2016-04-22 19:09:55,881 INFO  Component.RAW: RAW DATA OUT 

Any ideas if spectrumerror error="16" and CONNECTION_ERROR_NETWORK_ERROR ?

Cannot receive messages

When a message is received, the following error shows up in the log. Sending messages is no problem.

Registering for a new whatsapp password

I think transwhat should allow a user to register for a new whatsapp password. The current method is not well documented. I'm not entirely sure what the registration flow should be. This is my idea:

  1. User registers with transport, filling in their phone number and leaving the password field blank
  2. Transwhat requests an sms code from whatsapp.
  3. The bot prompts the user for the sms code.
  4. The user enters the sms code.
  5. The bot then requests a password.
  6. The bot then sends the password to the user.
  7. The user must register with the transport again, but this time they fill in the password.

I don't entirely like this workflow. Suggestions would be appreciated.

Missing Features

  • Get status message

Under development (in develop branch)

  • Recieve Broadcasts
  • User statuses (and other notifications)
  • Request new password
  • Profile pictures

Waiting for SpectrumIM/spectrum2#91

  • Sending Broadcasts
  • Groupchat management

Waiting for SpectrumIM/spectrum2#89

  • Last seen (XEP-0012)

Jingle?

  • File transfer
  • Receive Cards

Pending

  • Profile pictures in groupchat
  • Setting profile picture
  • Blocking Users # This may be unnecessary as XMPP can handle to blocking without whatsapp
  • Register new phone (Untrusted Identities error?)

Crash when user change XMPP status

2013-08-06 19:33:22,431 INFO Session: Status changed: 1
error: uncaptured python exception, closing channel <Spectrum2.iochannel.IOChannel connected at 0xa3d0a4c> (<class 'google.protobuf.message.DecodeError'>:Tag had invalid wire type. [/usr/lib/python2.7/asyncore.py|read|83] [/usr/lib/python2.7/asyncore.py|handle_read_event|444] [/home/vt/transwhat/Spectrum2/iochannel.py|handle_read|24] [/home/vt/transwhat/transwhat.py|handleTransportData|60] [/home/vt/transwhat/Spectrum2/backend.py|handleDataRead|352] [/usr/lib/python2.7/site-packages/google/protobuf/message.py|ParseFromString|179] [/usr/lib/python2.7/site-packages/google/protobuf/internal/python_message.py|MergeFromString|755] [/usr/lib/python2.7/site-packages/google/protobuf/internal/python_message.py|InternalParse|777] [/usr/lib/python2.7/site-packages/google/protobuf/internal/decoder.py|SkipField|710] [/usr/lib/python2.7/site-packages/google/protobuf/internal/decoder.py|_RaiseInvalidWireType|679])

sync support in yowsup-2 branche is broken

the sync method in buddylist is missing:

Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/opt/transwhat/bot.py", line 78, in _sync
    count = self.session.buddies.sync(user, password)
AttributeError: 'BuddyList' object has no attribute 'sync'

Discovery does not work

Hello,

I try to install this transport on Ubuntu Server 15.10 (Kernal 4.2.0-27).
I've installed prosody (Version 0.9.8), spectrum2 (Version 2.0.1-git-e921269) and transwhat (Version: today).

Here the config files:
prosody.cfg.lua
whatsapp.cfg

As Client i use Gajim (Version 0.16.5).

If I connect to the server an try to discover the services i get no response.
gajim

If I change the adress of the server to whatsapp.0l.de i get the following error message:
gajim2

The service is not browsable
This type of service does not contain any items to browse.

Attached the logs from prosody and spectrum2.
I don't see any error.

regards
prosody.log.txt
spectrum2.log.txt

TypeError: Incorrect padding on connect attempt when password incorrect

I'm trying to run transwhat as a spectrum2 backend. I've set up spectrum2 (it's running ICQtransport for two weeks now) and launched transwhat. I got my password from WART, registered to transport, and I'm getting the error below when trying to log in. I took a tcpdump capture, the connection is made successfully to the e1.whatsapp.net:443, and it's closing by the remote, so it looks like the data is transmitting fine.

Environment:

OS:
FreeBSD 10-STABLE

Python:

Backend debug log:

Python 2.7.11 (default, Jan 28 2016, 12:50:28) 
[GCC 4.2.1 Compatible FreeBSD Clang 3.4.1 (tags/RELEASE_34/dot1-final 208032)] on freebsd10
2016-02-17 16:46:55,185 DEBUG WhatsAppBackend: Backend started
2016-02-17 16:46:55,221 DEBUG WhatsAppBackend: handleLoginRequest([email protected], legacyName=79028324213)
2016-02-17 16:46:55,221 DEBUG yowsup.stacks.yowstack: Initializing stack
2016-02-17 16:46:55,221 DEBUG yowsup.stacks.yowstack: Constructed Network Layer
2016-02-17 16:46:55,222 DEBUG yowsup.stacks.yowstack: Constructed Stanza Regulator Layer
2016-02-17 16:46:55,222 DEBUG yowsup.stacks.yowstack: Constructed Crypt Layer
2016-02-17 16:46:55,222 DEBUG yowsup.stacks.yowstack: Constructed Coder Layer
2016-02-17 16:46:55,222 DEBUG yowsup.stacks.yowstack: Constructed Axolotl Layer
2016-02-17 16:46:55,222 DEBUG yowsup.stacks.yowstack: Constructed Authentication Layer - Messages Layer - Receipt Layer - Ack Layer - Media Layer - Ib Layer - Iq Layer - notification Ib Layer - Iq Layer - Chatstate Layer - call Layer - Privacy Layer - Profiles Layer - Groups Iq Layer - Presence Layer
2016-02-17 16:46:55,222 DEBUG yowsup.stacks.yowstack: Constructed Interface Layer
2016-02-17 16:46:55,222 INFO Session: Created: 79028324213
2016-02-17 16:46:55,223 INFO Session: [email protected] attempting login
2016-02-17 16:46:55,223 DEBUG yowsup.layers.network.layer: Connecting to e1.whatsapp.net:443
2016-02-17 16:46:55,320 DEBUG WhatsAppBackend: handleBuddies(buddies=)
2016-02-17 16:46:55,673 ERROR transwhat: Traceback (most recent call last):
  File "/usr/local/transwhat/transwhat.py", line 94, in <module>
    asyncore.loop(timeout=1.0, count=10, use_poll = True)
  File "/usr/local/lib/python2.7/asyncore.py", line 220, in loop
    poll_fun(timeout, map)
  File "/usr/local/lib/python2.7/asyncore.py", line 201, in poll2
    readwrite(obj, flags)
  File "/usr/local/lib/python2.7/asyncore.py", line 123, in readwrite
    obj.handle_error()2016-02-17 16:46:55,185 DEBUG WhatsAppBackend: Backend started
2016-02-17 16:46:55,221 DEBUG WhatsAppBackend: handleLoginRequest([email protected], legacyName=79028324213)
2016-02-17 16:46:55,221 DEBUG yowsup.stacks.yowstack: Initializing stack
2016-02-17 16:46:55,221 DEBUG yowsup.stacks.yowstack: Constructed Network Layer
2016-02-17 16:46:55,222 DEBUG yowsup.stacks.yowstack: Constructed Stanza Regulator Layer
2016-02-17 16:46:55,222 DEBUG yowsup.stacks.yowstack: Constructed Crypt Layer
2016-02-17 16:46:55,222 DEBUG yowsup.stacks.yowstack: Constructed Coder Layer
2016-02-17 16:46:55,222 DEBUG yowsup.stacks.yowstack: Constructed Axolotl Layer
2016-02-17 16:46:55,222 DEBUG yowsup.stacks.yowstack: Constructed Authentication Layer - Messages Layer - Receipt Layer - Ack Layer - Media Layer - Ib Layer - Iq Layer - notification Ib Layer - Iq Layer - Chatstate Layer - call Layer - Privacy Layer - Profiles Layer - Groups Iq Layer - Presence Layer
2016-02-17 16:46:55,222 DEBUG yowsup.stacks.yowstack: Constructed Interface Layer
2016-02-17 16:46:55,222 INFO Session: Created: 79028324213
2016-02-17 16:46:55,223 INFO Session: [email protected] attempting login
2016-02-17 16:46:55,223 DEBUG yowsup.layers.network.layer: Connecting to e1.whatsapp.net:443
2016-02-17 16:46:55,320 DEBUG WhatsAppBackend: handleBuddies(buddies=)
2016-02-17 16:46:55,673 ERROR transwhat: Traceback (most recent call last):
  File "/usr/local/transwhat/transwhat.py", line 94, in <module>
    asyncore.loop(timeout=1.0, count=10, use_poll = True)
  File "/usr/local/lib/python2.7/asyncore.py", line 220, in loop
    poll_fun(timeout, map)
  File "/usr/local/lib/python2.7/asyncore.py", line 201, in poll2
    readwrite(obj, flags)
  File "/usr/local/lib/python2.7/asyncore.py", line 123, in readwrite
    obj.handle_error()
  File "/usr/local/lib/python2.7/asyncore.py", line 110, in readwrite
    obj.handle_write_event()
  File "/usr/local/lib/python2.7/asyncore.py", line 467, in handle_write_event
    self.handle_connect_event()
  File "/usr/local/lib/python2.7/asyncore.py", line 455, in handle_connect_event
    self.handle_connect()
  File "/usr/local/lib/python2.7/site-packages/yowsup/layers/network/layer.py", line 68, in handle_connect
    self.emitEvent(YowLayerEvent(YowNetworkLayer.EVENT_STATE_CONNECTED))
  File "/usr/local/lib/python2.7/site-packages/yowsup/layers/__init__.py", line 72, in emitEvent
    self.__upper.emitEvent(yowLayerEvent)
  File "/usr/local/lib/python2.7/site-packages/yowsup/layers/__init__.py", line 72, in emitEvent
    self.__upper.emitEvent(yowLayerEvent)
  File "/usr/local/lib/python2.7/site-packages/yowsup/layers/__init__.py", line 72, in emitEvent
    self.__upper.emitEvent(yowLayerEvent)
  File "/usr/local/lib/python2.7/site-packages/yowsup/layers/__init__.py", line 72, in emitEvent
    self.__upper.emitEvent(yowLayerEvent)
  File "/usr/local/lib/python2.7/site-packages/yowsup/layers/__init__.py", line 66, in emitEvent
    if self.__upper and not self.__upper.onEvent(yowLayerEvent):
  File "/usr/local/lib/python2.7/site-packages/yowsup/layers/__init__.py", line 187, in onEvent
    stopEvent = stopEvent or s.onEvent(yowLayerEvent)
  File "/usr/local/lib/python2.7/site-packages/yowsup/layers/auth/layer_authentication.py", line 53, in onEvent
    self.login()
  File "/usr/local/lib/python2.7/site-packages/yowsup/layers/auth/layer_authentication.py", line 57, in login
    self.credentials = self._credentials or self.__getCredentials()
  File "/usr/local/lib/python2.7/site-packages/yowsup/layers/auth/layer_authentication.py", line 37, in __getCredentials
    password = base64.b64decode(pb64)
  File "/usr/local/lib/python2.7/base64.py", line 77, in b64decode
    raise TypeError(msg)
TypeError: Incorrect padding
  File "/usr/local/lib/python2.7/asyncore.py", line 110, in readwrite
    obj.handle_write_event()
  File "/usr/local/lib/python2.7/asyncore.py", line 467, in handle_write_event
    self.handle_connect_event()
  File "/usr/local/lib/python2.7/asyncore.py", line 455, in handle_connect_event
    self.handle_connect()
  File "/usr/local/lib/python2.7/site-packages/yowsup/layers/network/layer.py", line 68, in handle_connect
    self.emitEvent(YowLayerEvent(YowNetworkLayer.EVENT_STATE_CONNECTED))
  File "/usr/local/lib/python2.7/site-packages/yowsup/layers/__init__.py", line 72, in emitEvent
    self.__upper.emitEvent(yowLayerEvent)
  File "/usr/local/lib/python2.7/site-packages/yowsup/layers/__init__.py", line 72, in emitEvent
    self.__upper.emitEvent(yowLayerEvent)
  File "/usr/local/lib/python2.7/site-packages/yowsup/layers/__init__.py", line 72, in emitEvent
    self.__upper.emitEvent(yowLayerEvent)
  File "/usr/local/lib/python2.7/site-packages/yowsup/layers/__init__.py", line 72, in emitEvent
    self.__upper.emitEvent(yowLayerEvent)
  File "/usr/local/lib/python2.7/site-packages/yowsup/layers/__init__.py", line 66, in emitEvent
    if self.__upper and not self.__upper.onEvent(yowLayerEvent):
  File "/usr/local/lib/python2.7/site-packages/yowsup/layers/__init__.py", line 187, in onEvent
    stopEvent = stopEvent or s.onEvent(yowLayerEvent)
  File "/usr/local/lib/python2.7/site-packages/yowsup/layers/auth/layer_authentication.py", line 53, in onEvent
    self.login()
  File "/usr/local/lib/python2.7/site-packages/yowsup/layers/auth/layer_authentication.py", line 57, in login
    self.credentials = self._credentials or self.__getCredentials()
  File "/usr/local/lib/python2.7/site-packages/yowsup/layers/auth/layer_authentication.py", line 37, in __getCredentials
    password = base64.b64decode(pb64)
  File "/usr/local/lib/python2.7/base64.py", line 77, in b64decode
    raise TypeError(msg)
TypeError: Incorrect padding

Add documentation

We really need a INSTALL.md to show people on how to get started.
I get a couple of requests per month about this.
Please use this issue to collect some pieces of information for this guide.

Conservative initialization

Full initialization: i.e. Sync, Presence subscribe, get Profile pictures etc. Should only be done once, on first login. Further logins should not trigger such expensive gets.

Should we really crash on: AuthError: not-authorized

Some error reporting for the user / Spectrum 2 would be nice.

backend.log

2016-01-10 12:39:53,991 INFO Session: Created: 4915757180xxx
2016-01-10 12:39:53,991 INFO Session: [email protected] attempting login
2016-01-10 12:39:55,439 ERROR transwhat: Traceback (most recent call last):
  File "/home/stv0g/workspace/transwhat/transwhat.py", line 95, in <module>
    asyncore.loop(timeout=1.0, count=10, use_poll = True)
  File "/usr/lib/python2.7/asyncore.py", line 220, in loop
    poll_fun(timeout, map)
  File "/usr/lib/python2.7/asyncore.py", line 201, in poll2
    readwrite(obj, flags)
  File "/usr/lib/python2.7/asyncore.py", line 123, in readwrite
    obj.handle_error()
  File "/usr/lib/python2.7/asyncore.py", line 108, in readwrite
    obj.handle_read_event()
  File "/usr/lib/python2.7/asyncore.py", line 449, in handle_read_event
    self.handle_read()
  File "build/bdist.linux-x86_64/egg/yowsup/layers/network/layer.py", line 86, in handle_read
    self.receive(data)
  File "build/bdist.linux-x86_64/egg/yowsup/layers/network/layer.py", line 94, in receive
    self.toUpper(data)
  File "build/bdist.linux-x86_64/egg/yowsup/layers/__init__.py", line 59, in toUpper
    self.__upper.receive(data)
  File "build/bdist.linux-x86_64/egg/yowsup/layers/stanzaregulator/layer.py", line 28, in receive
    self.processReceived()
  File "build/bdist.linux-x86_64/egg/yowsup/layers/stanzaregulator/layer.py", line 48, in processReceived
    self.toUpper(oneMessageData)
  File "build/bdist.linux-x86_64/egg/yowsup/layers/__init__.py", line 59, in toUpper
    self.__upper.receive(data)
  File "build/bdist.linux-x86_64/egg/yowsup/layers/auth/layer_crypt.py", line 63, in receive
    self.toUpper(payload)
  File "build/bdist.linux-x86_64/egg/yowsup/layers/__init__.py", line 59, in toUpper
    self.__upper.receive(data)
  File "build/bdist.linux-x86_64/egg/yowsup/layers/coder/layer.py", line 35, in receive
    self.toUpper(node)
  File "build/bdist.linux-x86_64/egg/yowsup/layers/__init__.py", line 59, in toUpper
    self.__upper.receive(data)
  File "build/bdist.linux-x86_64/egg/yowsup/layers/axolotl/layer.py", line 126, in receive
    self.toUpper(protocolTreeNode)
  File "build/bdist.linux-x86_64/egg/yowsup/layers/__init__.py", line 59, in toUpper
    self.__upper.receive(data)
  File "build/bdist.linux-x86_64/egg/yowsup/layers/__init__.py", line 169, in receive
    s.receive(data)
  File "build/bdist.linux-x86_64/egg/yowsup/layers/__init__.py", line 105, in receive
    recv(node)
  File "build/bdist.linux-x86_64/egg/yowsup/layers/auth/layer_authentication.py", line 77, in handleFailure
    raise AuthError(nodeEntity.getReason())
AuthError: not-authorized

echo messages in wa group chat after a while

when i join a group chat in wa at the beginning everything seems to be fine, excepted when sendind pic (double massage)

but after a while i get echo messages in wa group chat. this is the backend log:

2015-12-30 10:24:47,857 INFO Session: Started typing: 33619571626
2015-12-30 10:24:58,265 INFO Session: Started typing: 33619571626
2015-12-30 10:25:04,110 INFO Session: Paused typing: 33619571626
2015-12-30 10:25:04,968 INFO Session: Started typing: 33619571626
2015-12-30 10:25:11,470 ERROR WhatsAppBackend: handleConvMessagePayload
2015-12-30 10:25:12,806 DEBUG WhatsAppBackend: handleMessageSendRequest(user=[email protected], buddy=33658865593-1409925402, message=Keine sau hier?, xhtml = )
2015-12-30 10:25:12,807 INFO Session: Message sent from 33781852856 to 33658865593-1409925402: Keine sau hier?
2015-12-30 10:25:12,807 DEBUG Session: Group Message from me to <group.Group instance at 0x75cd0300> Groups: {'33674514813-1446536444': <group.Group instance at 0x75cc5648>, '33658865593-1409925402': <group.Group instance at 0x75cd0300>}
2015-12-30 10:25:13,042 DEBUG Session: received ack 1451467512-31 message [email protected] 1451467512
2015-12-30 10:25:13,335 DEBUG Session: received receipt, sending ack: 1451467512-31 [email protected] 1451467513 None [email protected] None None
2015-12-30 10:25:13,452 DEBUG Session: received receipt, sending ack: 1451467512-31 [email protected] 1451467513 read [email protected] None None
2015-12-30 10:25:13,460 DEBUG Session: received receipt, sending ack: 1451467512-31 [email protected] 1451467513 None [email protected] None None
2015-12-30 10:25:14,117 DEBUG Session: received receipt, sending ack: 1451467512-31 [email protected] 1451467513 None [email protected] None None
2015-12-30 10:25:14,960 DEBUG Session: received receipt, sending ack: 1451467512-31 [email protected] 1451467514 None [email protected] None None
2015-12-30 10:25:15,172 INFO Session: Started typing: 33619571626
2015-12-30 10:25:15,594 DEBUG Session: received receipt, sending ack: 1451467512-31 [email protected] 1451467515 None [email protected] None None
2015-12-30 10:25:17,450 DEBUG Session: received receipt, sending ack: 1451467512-31 [email protected] 1451467517 None [email protected] None None
2015-12-30 10:25:17,781 DEBUG Session: received receipt, sending ack: 1451467512-31 [email protected] 1451467517 None [email protected] None None
2015-12-30 10:25:22,078 DEBUG yowsup.layers.protocol_iq.layer: ping queue size: 1
2015-12-30 10:25:22,688 INFO Session: Paused typing: 33619571626
2015-12-30 10:25:28,884 DEBUG WhatsAppBackend: handleLeaveRoomRequest(user=[email protected], room=33658865593-1409925402)
2015-12-30 10:25:28,884 INFO Session: Leaving room: 33781852856 room=33658865593-1409925402
2015-12-30 10:25:31,713 ERROR WhatsAppBackend: handleConvMessagePayload
2015-12-30 10:25:31,714 DEBUG WhatsAppBackend: handleMessageSendRequest(user=[email protected], buddy=33674514813-1446536444, message=., xhtml = )
2015-12-30 10:25:31,715 INFO Session: Message sent from 33781852856 to 33674514813-1446536444: .
2015-12-30 10:25:31,715 DEBUG Session: Group Message from me to <group.Group instance at 0x75cc5648> Groups: {'33674514813-1446536444': <group.Group instance at 0x75cc5648>, '33658865593-1409925402': <group.Group instance at 0x75cd0300>}
2015-12-30 10:25:31,942 DEBUG Session: received ack 1451467531-34 message [email protected] 1451467531
2015-12-30 10:25:33,400 DEBUG Session: received receipt, sending ack: 1451467531-34 [email protected] 1451467533 None [email protected] None None
2015-12-30 10:25:35,499 DEBUG Session: received receipt, sending ack: 1451467531-34 [email protected] 1451467535 None [email protected] None None
2015-12-30 10:25:36,919 DEBUG Session: received receipt, sending ack: 1451467459-29 [email protected] 1451467536 read None None None
2015-12-30 10:25:39,802 INFO Session: Presence received: None None [email protected] None
2015-12-30 10:25:39,802 INFO Session: Is available: 491721783957 (nick=)
2015-12-30 10:25:40,214 DEBUG Session: received receipt, sending ack: 1451467531-34 [email protected] 1451467540 None [email protected] None None
2015-12-30 10:25:42,855 INFO Session: Started typing: 491721783957
2015-12-30 10:25:44,592 INFO Session: Paused typing: 491721783957
2015-12-30 10:25:46,721 INFO Session: Started typing: 491721783957
2015-12-30 10:25:54,837 DEBUG YowsupAppLayer: Received Message: Message:

screenshot_2015-12-30-10-33-49

BeautifulSoup, a dependency of e4u, is not supported in latest Python version

Installing e4u in Parabola GNU/Linux, a fork of Arch Linux, gives the following result:

`[dario@quadcore transwhat]$ sudo pip install --pre e4u
Requirement already satisfied (use --upgrade to upgrade): e4u in /usr/lib/python3.5/site-packages/e4u-0.2rc1-py3.5.egg
Requirement already satisfied (use --upgrade to upgrade): setuptools in /usr/lib/python3.5/site-packages (from e4u)
Collecting BeautifulSoup (from e4u)
  Using cached BeautifulSoup-3.2.1.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-q1sei75c/BeautifulSoup/setup.py", line 22
        print "Unit tests have failed!"
                                      ^
    SyntaxError: Missing parentheses in call to 'print'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-q1sei75c/BeautifulSoup/`

Actually there should be an updated version of said library for Python 3, but e4u still depends on the old version.

Send image failed

Unfortunately sending images does not work for me.
This is my Spectrum2-Log:
Is this a transwhat or a Spectrum2-based issue?

2017-01-08 13:37:17,510 INFO Session: Message sent from xxxxxxxxxxxx to xxxxxxxxxxxx: https://xxxxxxxxx.de:5281/upload/3f38b2e5-b555-4d5e-aed8-884f6d9922d8/54774b1e-495f-4281-bad8-e523f7d843d3.jpg (xhtml=)
2017-01-08 13:37:17,510 INFO Session: URL: https://xxxxxxxxx.de:5281/upload/3f38b2e5-b555-4d5e-aed8-884f6d9922d8/54774b1e-495f-4281-bad8-e523f7d843d3.jpg
2017-01-08 13:37:17,585 INFO Session: Success: Image downloaded to <deferred.Deferred object at 0x7f69267af890>
2017-01-08 13:37:17,585 INFO Session: Sending image to [email protected]
2017-01-08 13:37:17,589 ERROR transwhat: Traceback (most recent call last):
  File "/opt/transwhat/transwhat.py", line 80, in handleTransportData
    plugin.handleDataRead(data)
  File "/opt/transwhat/Spectrum2/backend.py", line 424, in handleDataRead
    self.handleConvMessagePayload(wrapper.payload)
  File "/opt/transwhat/Spectrum2/backend.py", line 280, in handleConvMessagePayload
    self.handleMessageSendRequest(payload.userName, payload.buddyName, payload.message, payload.xhtml, payload.id)
  File "/opt/transwhat/whatsappbackend.py", line 80, in handleMessageSendRequest
    self.sessions[user].sendMessageToWA(buddy, message, ID, xhtml)
  File "/opt/transwhat/session.py", line 697, in sendMessageToWA
    self.logger.info("WA Message send to %s with ID %s", buddy, waId)
UnboundLocalError: local variable 'waId' referenced before assignment

2017-01-08 13:37:17,976 ERROR yowsup.layers.protocol_media.mediauploader: Error occured at transfer global name 'resultRequestUploadIqProtocolEntity' is not defined
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.5.0-py2.7.egg/yowsup/layers/protocol_media/mediauploader.py", line 102, in run
    self.progressCallback(self.sourcePath, self.jid, uploadUrl, int(status))
  File "/opt/transwhat/yowsupwrapper.py", line 209, in onUploadProgress
    resultRequestUploadIqProtocolEntity.getUrl(),
NameError: global name 'resultRequestUploadIqProtocolEntity' is not defined
2017-01-08 13:37:17,978 ERROR Session: Upload Error!

provide setup.py

if possible, it would be nice to have a setup.py to ease packaging

unblocking contacts doesn't seem to work

A blocked transwhat buddy can't be unblocked. I tried with Pidgin and Conversations, both clients update the blocked-status in their UI just fine, but the buddy keeps shown as offline/unavailable and messages from the buddy don't arrive.

Simplify contact import

We should provide a way to mass-import your phonebook.

Previously, this was done by using Google APIs to fetch Google Mail contacts (which are synchronized to the phone for most users).

However, I removed this feature because it was broken and the fact that I don't like to support Google products anymore. I don't want not promote the usage of Google Mail to sync your contacts!

What to you think about sending your contacts via CardDAV file to the bot? The bot then extracts all numbers and syncs them with the WhatsApp servers.

NameError: global name 'YowStackBuilder' is not defined

Tried both development and yowsup-2 branches. Component registers with prosody, is shown there in xmpp service discovery, I can register a whatsapp with it with Pidgin, but then it hangs.

backend.log :

2016-10-09 21:38:13,532 ERROR transwhat: Traceback (most recent call last):
File "/opt/transwhat/transwhat.py", line 80, in handleTransportData
plugin.handleDataRead(data)
File "/opt/transwhat/Spectrum2/backend.py", line 418, in handleDataRead
self.handleLoginPayload(wrapper.payload)
File "/opt/transwhat/Spectrum2/backend.py", line 259, in handleLoginPayload
self.handleLoginRequest(payload.user, payload.legacyName, payload.password, payload.extraFields)
File "/opt/transwhat/whatsappbackend.py", line 60, in handleLoginRequest
self.sessions[user] = Session(self, user, legacyName, extra)
File "/opt/transwhat/session.py", line 60, in init
super(Session, self).init()
File "/opt/transwhat/yowsupwrapper.py", line 89, in init
stackBuilder = YowStackBuilder()
NameError: global name 'YowStackBuilder' is not defined

spectrum2.log

2016-10-09 21:37:44,807 INFO User: [email protected]: Changing legacy network presence to 0
2016-10-09 21:37:44,808 INFO UserManager: PRESENCE2 whatsapp.datenklause.de
2016-10-09 21:37:44,810 INFO User: [email protected]/08168e94-bf4c-465c-a0fa-32e007eab438: got disco#info
2016-10-09 21:37:44,811 INFO Component.RAW: RAW DATA OUT
2016-10-09 21:37:44,812 INFO User: PRESENCE [email protected]/08168e94-bf4c-465c-a0fa-32e007eab438 whatsapp.datenklause.de
2016-10-09 21:37:44,814 INFO Component.RAW: RAW DATA OUT Connecting
2016-10-09 21:37:44,815 INFO User: [email protected]: Changing legacy network presence to 2
2016-10-09 21:37:44,816 INFO UserManager: PRESENCE2 whatsapp.datenklause.de
2016-10-09 21:37:44,817 INFO Component.RAW: RAW DATA IN Buddies
2016-10-09 21:37:44,818 INFO XMPPRosterManager: [email protected]: This server supports remote roster protoXEP
2016-10-09 21:37:45,025 INFO Component.RAW: RAW DATA IN
2016-10-09 21:37:45,030 INFO User: [email protected]/08168e94-bf4c-465c-a0fa-32e007eab438: got disco#info
2016-10-09 21:37:50,246 INFO NetworkPluginServer: Sending PING to backends
2016-10-09 21:37:50,247 INFO NetworkPluginServer: PING to 0x18fe890 (ID=10955)
2016-10-09 21:38:10,248 INFO NetworkPluginServer: Sending PING to backends
2016-10-09 21:38:10,248 INFO NetworkPluginServer: Disconnecting backend 0x18fe890 (ID=10955). PING response not received.
2016-10-09 21:38:10,249 INFO NetworkPluginServer: Backend 0x18fe890 (ID=10955) disconnected. Current backend count=0
2016-10-09 21:38:10,249 ERROR NetworkPluginServer: Backend 0x18fe890 (ID=10955) disconnected (probably crashed) with active user [email protected]
2016-10-09 21:38:10,249 INFO User: [email protected]: Disconnecting from legacy network Internal Server Error, please reconnect., trying to reconnect automatically.
2016-10-09 21:38:10,252 INFO NetworkPluginServer: Starting new backend /opt/transwhat/transwhat.py --host 127.0.0.1 --port 35293 --service.backend_id=2 "-j" "whatsapp.datenklause.de" "/etc/spectrum2/transports/whatsapp.cfg"
2016-10-09 21:38:10,256 INFO NetworkPluginServer: There is no backend to handle user [email protected]. Adding him to queue.
2016-10-09 21:38:13,490 INFO NetworkPluginServer: New backend 0x18fe890 connected. Current backend count=1
2016-10-09 21:38:13,492 INFO NetworkPluginServer: PING to 0x18fe890 (ID=)
2016-10-09 21:38:13,500 INFO NetworkPluginServer: Associating [email protected] with this backend
2016-10-09 21:38:26,477 INFO UserManager: [email protected]: Disconnecting user
2016-10-09 21:38:26,479 INFO User: [email protected]: Destroying
2016-10-09 21:38:26,479 INFO Component.RAW: RAW DATA OUT
2016-10-09 21:38:26,482 INFO MySQLBackend: Disconnecting
2016-10-09 21:38:26,489 INFO NetworkPluginServer: Stopping backend 0x18fe890
2016-10-09 21:38:26,500 INFO cerr: Warning: Pending events in SimpleEventLoop at destruction tim

Any ideas?

Error connecting to server

Sometimes (can not find pattern) transport does not connects to server. Transport JID send me next message:
Internal Server Error, please reconnect
There are logs:

2016-04-17 02:01:30,256 INFO Session: Created: [my_number]
2016-04-17 02:01:30,257 INFO Session: ilia@xmpp attempting login
2016-04-17 02:01:39,949 ERROR transwhat: Traceback (most recent call last):
  File "/opt/transwhat/transwhat.py", line 94, in <module>
    asyncore.loop(timeout=1.0, count=10, use_poll = True)
  File "/usr/lib/python2.7/asyncore.py", line 220, in loop
    poll_fun(timeout, map)
  File "/usr/lib/python2.7/asyncore.py", line 201, in poll2
    readwrite(obj, flags)
  File "/usr/lib/python2.7/asyncore.py", line 123, in readwrite
    obj.handle_error()
  File "/usr/lib/python2.7/asyncore.py", line 108, in readwrite
    obj.handle_read_event()
  File "/usr/lib/python2.7/asyncore.py", line 449, in handle_read_event
    self.handle_read()
  File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/network/layer.py", line 88, in handle_read
    self.receive(data)
  File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/network/layer.py", line 96, in receive
    self.toUpper(data)
  File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/__init__.py", line 75, in toUpper
    self.__upper.receive(data)
  File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/stanzaregulator/layer.py", line 29, in receive
    self.processReceived()
  File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/stanzaregulator/layer.py", line 49, in processReceived
    self.toUpper(oneMessageData)
  File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/__init__.py", line 75, in toUpper
    self.__upper.receive(data)
  File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/auth/layer_crypt.py", line 65, in receive
    self.toUpper(payload)
  File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/__init__.py", line 75, in toUpper
    self.__upper.receive(data)
  File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/coder/layer.py", line 35, in receive
    self.toUpper(node)
  File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/__init__.py", line 75, in toUpper
    self.__upper.receive(data)
  File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/axolotl/layer.py", line 133, in receive
    self.toUpper(protocolTreeNode)
  File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/__init__.py", line 75, in toUpper
    self.__upper.receive(data)
  File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/__init__.py", line 188, in receive
    s.receive(data)
  File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/__init__.py", line 124, in receive
    recv(node)
  File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/auth/layer_authentication.py", line 78, in handleFailure
    raise AuthError(nodeEntity.getReason())
AuthError: not-authorized

Sometimes it connects, sometimes not.

Debian 8 x64, Ejabberd 16.02, Spectrum2 2.0.3, Gajim 0.16.5, latest git version of Transwhat (c66d492)

Find alternative for Spectrum

We should look out for a Spectrum alternative.

I dont like this mixture of C++ and Python code which communicate via Google protobuf.

It's error prone and limiting the available features of XMPP

transwhat fails to start without the -j option

I've cloned the transwhat repo, installed the dependencies, and added it as a backend to spectrum2.

It looks like transwhat is expecting a j <jid> argument, but the spectrum2 frontend isn't passing that as an argument when it starts transwhat:

2016-02-18 20:49:00,612 INFO  NetworkPluginServer: Starting new backend /opt/transwhat/transwhat.py --host 127.0.0.1 --port 32531 --service.backend_id=1 "--no-daemonize" "--config" "/etc/spectrum2/transports/whatsapp.cfg" 
2016-02-18 20:49:00,613 INFO  NetworkPluginServer: Tried to spawn first backend with pid 7818
2016-02-18 20:49:00,613 INFO  NetworkPluginServer: Backend should now connect to Spectrum2 instance. Spectrum2 won't accept any connection before backend connects
2016-02-18 20:49:01,613 ERROR NetworkPluginServer: Backend can not be started, exit_code=2, possible error: No such file or directory
2016-02-18 20:49:01,613 ERROR NetworkPluginServer: This usually means the path to backend executable defined in config file as '[service] backend="..."' is wrong or the executable does not exists.
2016-02-18 20:49:01,614 ERROR NetworkPluginServer: Check backend log for more details

If I try running /opt/transwhat/transwhat.py with those same arguments, I get this output:

spectrum2@chat:~$ /opt/transwhat/transwhat.py --host 127.0.0.1 --port 32531 --service.backend_id=1 "--no-daemonize" "--config" "/etc/spectrum2/transports/whatsapp.cfg"
usage: transwhat.py [-h] [--debug] --host HOST --port PORT
                    --service.backend_id ID -j J
                    config
transwhat.py: error: argument -j is required

incomplete REPLACE statement

Hello everyone,
I recently tried to setup an instance of Transwhat and came across an exception raised by the REPLACE statement in buddy.py:42
MySQL is complaining about the missing default value for some field which has a NOT NULL constraint.
So we either need to define a template value there and/or change the table's schema (conf/schame.sql), since REPLACE will behave as INSERT, if no value is found for the given key.

Download of encrypted media to local directory and provide a link to it

I played with a combination of tgalal's latest yowsup version and jlguardi's. You find that in my repo.
For this a made an experimental Transwhat, which fixed the Unicode bug and download encrypted images. However, it is very dirty and it would be good if we would read the server path and URL from the Transwhat config. Spectrum support this for libpurple backends, like facebook. Even if youwsup is changing the api , we need such a kind of downloading to the local server.

Registration not supported?

I have a problem, that I am not able to register with the transport (Spectrum2 is running in gateway mode).
Does anyone have tried this so far?

2015-12-06 13:52:23,749 INFO  Component.RAW: RAW DATA IN <iq type='get' to='whatsapp.0l.de' from='[email protected]/cam' id='purpleb5f62d29'><query xmlns='jabber:iq:register'/></iq>
2015-12-06 13:52:23,750 INFO  Component.RAW: RAW DATA OUT <iq from="whatsapp.0l.de" id="purpleb5f62d29" to="[email protected]/cam" type="error"><error type="cancel"><feature-not-implemented xmlns="urn:ietf:para

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.