- Remove some useless locking, use messages instead
- Sessions can be created locally (we need to do a new Session) or from
incoming messages (the session is created for us but we still need to
attach a window to it). The code was not handling all cases right
- Better detection of carbons or group chat replay sessions (not sure
what they are but now we check the type to detect them)
- Add PubSub logic so we can request and handle the avatars
- Add base64 decoding + image decoding
- Rework roster item size and drawing to fit the avatar in
- Add a cache dir to store the avatars in
Use separate maps for group and normal chat, saving much confusion.
Use gloox sessions and MUC rooms as keys instead of strings.
Remove linear lookups in the map (what's the point of having a map?)
Do not create a MessageSession for MUCs as it prevents getting messages
in the MUC handler
This should fix all cases where we would accidentally create multiple
windows for the same thing.
This is the recommended best practice, and allows starting multiple
Renga instances for the same account. With an hardcoded resource, they
would conflict with each other.
I checked the Gloox sources and it already validates the certificate
validity dates as well as the server name. There is nothing more we need
to validate. We may want better handling (explicit error on invalid SSL,
allowing to ignore certificate problems, allow the user to set up their
own certs, etc), but that can be tracked in separate issues.
Fixes #30
There will be a lot more to do, but at least with this change, it is not
possible anymore to create a UserID outside of JRoster. So there should
always be a unique instance of the UserID for each roster entry. This
makes sure the state of the user is globally synchronized properly, and
no part of the code is accidentally working on a copy instead of the
real thing.