Commit graph

34 commits

Author SHA1 Message Date
Steffen Vogel a1b8cf0ca9 Merge remote-tracking branch 'gh/dazzzl/yowsup2-port' into develop 2016-10-07 21:42:28 -04:00
Steffen Vogel ce2419ba27 Merge branch 'develop' of github.com:stv0g/transwhat into develop 2016-10-07 21:24:06 -04:00
DaZZZl 49fc66444c fix typo 2016-04-12 18:23:39 +02:00
DaZZZl 80059a7b91 read web storage from config file 2016-04-12 18:21:04 +02:00
Daniel Hiepler f25046de2d fix encoding issues 2016-04-10 00:21:58 +02:00
moyamo c72f0e9616 Disable updating users VCard because it is causing crashes 2016-04-09 22:48:44 +02:00
Steffen Vogel 22725c042f lots of whitespace cleanups 2016-04-06 22:02:40 +02:00
moyamo df305b8491 Allow multiple pictures to be sent in a short period of time
Picture data was stored in the session object. This means that if you
send multiple pictures within a short period of time the last picture
would overwrite the data of the other pictures. This would cause
pictures to be lost. Now picture data is stored in closures
2016-01-09 17:12:59 +02:00
moyamo 4273153d84 Amend 8bbdbb970d 2016-01-08 15:32:06 +02:00
moyamo 8bbdbb970d Allow user to set their whatsapp profile picture 2016-01-07 21:44:55 +02:00
moyamo aeb43dff55 Add ability to request password after receiving sms code 2016-01-07 21:11:54 +02:00
moyamo 513cdbcf10 Add functionality to request sms code via bot 2016-01-07 18:39:25 +02:00
moyamo e32365a065 Send xhtml on group message to XMPP MUC 2016-01-06 16:57:17 +02:00
moyamo ed6affe1ec Allow identical consecutive message
This used to be blocked to prevent duplicate messages. Now the ID is
checked instead of the body to detect duplicates.
2016-01-06 15:00:00 +02:00
moyamo 22cebef457 Revert upto c40d477667
Hard to find connection bugs are occuring. Reverting changes for now
2015-12-31 21:43:10 +02:00
moyamo fae4c648ee Use unicode string literals 2015-12-29 21:46:29 +02:00
moyamo 7302c4fc2c Handle edgecase when there are no buddies 2015-12-04 20:44:37 +02:00
Steffen Vogel df773a9670 updated file headers 2015-12-03 13:53:21 +01:00
moyamo 17c8057db7 Remove all mention of MySQL database 2015-12-02 23:08:09 +02:00
moyamo 8385888e97 Minor bug fixes 2015-12-01 23:21:38 +02:00
moyamo da8a415d32 Remove MySQL from Buddy.py 2015-12-01 21:33:02 +02:00
moyamo 8e08efabc9 Notify user when a group message is sent to a group they have not yet joined
Before messages sent to groups the user had not joined were lost. Now
the message is sent via the bot to the user. The bot suggests that the
user join the group and also relays the contents of the message.
2015-11-23 17:07:18 +02:00
root c5b42044b2 Merge branch 'groupchat-fix' of https://github.com/moyamo/transwhat into moyamo-groupchat-fix
Conflicts:
	Spectrum2/backend.py
	session.py
	yowsupwrapper.py
2015-11-10 13:24:40 +01:00
root 98b9487c7f send imgaes, locations, ...
fix presence
2015-11-09 23:09:12 +01:00
moyamo 1c0ae79ec2 Fix join room, inform user of all groups, and new participants
In the previous implementation join_room was called on all groups immediately
after the user was authenticated.  When a user joined a group, join_room will be
called again. This was incorrect behaviour and confused spectrum. There was no
truncation error, thus _shortenGroupId and _lengthenGroupId have edited to be a
no-op (and should be removed in the next commit).

The correct behavoiur is to only call join_room in
whatsappbackend.py:handleRoomJoined, however the user may do this before the
groups have been loaded, in which case those requests must be added to a queue.

The bot informs the user of all the groups the user has joined and when the user
is added to a new group.
2015-10-26 19:27:35 +02:00
moyamo 29d92b456e Shorten the name of groupchats to overcome truncation bug
The names of groupchats are truncated internally to 22 characters.
This causes many problems with groupchats, since spectrum incorrectly
identifies the chat by the long name.

To overcome this the phoneNumber-unixTime is converted to hexadecimal,
to shorten the groupchat below 22 characters
2015-10-09 18:42:59 +02:00
moyamo 7f1c9cd0db Shorten the name of groupchats to overcome truncation bug
The names of groupchats are truncated internally to 22 characters.
This causes many problems with groupchats, since spectrum incorrectly
identifies the chat by the long name.

To overcome this the phoneNumber-unixTime is converted to hexadecimal,
to shorten the groupchat below 22 characters
2015-09-21 20:30:11 +02:00
moyamo 4fd313e516 Download whatsapp profile pictures
Everytime the user requests a VCard the profile pictures are updated.
The sha1hash hash of the picture is calculated and stored in buddy.
2015-09-06 00:14:12 +02:00
moyamo 4c365e3f81 Add receiveing of images, videos and sound files
When a whatsapp buddy sends an image, video or sound to the spectrum
user, the spectrum user will receive a URL that links to the media.

FileTranfer in spectrum is not working, apparently. Thus media cannot be
sent yet.
2015-09-05 22:05:34 +02:00
moyamo a6971ad889 Add workaround to prevent double messages
For some reason spectrum occasionally sends to identical messages to
a buddy, one to the bare jid and one to /bot. This causes duplicate
messages. Since it is unlikely a user wants to send the same message
twice, we should just ignore the second message.

This is only a work around, a proper fix should be implemented.
2015-09-05 11:39:34 +02:00
Vitaly Takmazov 8e2c03aaae Transport was not initialized if user have no status message 2013-08-06 23:21:37 +04:00
Steffen Vogel 5fb1934cc5 added copyright and author infos 2013-08-02 01:45:51 +02:00
Steffen Vogel cb88abbdd7 added logging 2013-06-28 21:37:39 +02:00
Steffen Vogel 528d4ed759 initial code commit 2013-05-31 20:53:21 +02:00