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.
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.
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
Spectrum2/backend.py:handleDataRead is called when transwhat receives
data from Spectrum. The parameter `data' contains multiple (or pieces
of) WrapperMessages. Instead of passing all the data to
wrapper.ParseFromString. We should only pass a single WrapperMessage.
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
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.
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.