Remove interval handler and the user activity handler.
Make sure the connection is reset when logging out.
Also removed the reconnectTimeout, instead debounce the reconnect method by 1 second.
- Don't call show in a room's initialize method (instead let the code be more
similar to normal chats, in that it should listen to the "show" trigger).
- Rename chatBoxShouldBeShown to chatBoxMayBeShown
- Implement auto_join for rooms only once boxes have been fetched already.
and auto_login is true and credentials_url is set.
Trying to handle the case where tokens are used for credentials_url (and the
token is expired).
Not yet 100% happy with this implementation.
Previously views were only hidden, but not removed. This was an unnecessary
"optimization" which introduced unnecessary complexity.
Problem solved was that closing minimized chats didn't dereference the model
for hidden "normal" chat views, causing an exception to be raised when trying
to log out.
Couldn't handle messages with no "from" attribute.
Some refactoring to add code that checks if a messages is a headline to the
utils module.
Updated tests. Add sinon so that we can test returned value of spy.
Fixes an issue whereby those tokens are passed in but not used and instead
converse attempts to restore the session (and then totally ignores the tokens
when it fails).
Makes sense to me that you'd want your passed in tokens to be used always, even
when there are restorable tokens.
Don't call trimChats when the box is minimized or maximized, instead call it
only when the minimized chats toggle appears or disappears, since that's the
element that adds/removes space.
Also, a fix. 'onShow' has been renamed to 'onMaximized'
In the process refactored the code being tested.
- Move notifications code in MUC to src/converse-notification.js
- Trigger the 'contactStatusChanged' event in RosterContact and not in
ChatBoxView (which might not exist).
Don't make the event "this" context the protected converse object.
Can't trigger multiple data parameters, need to pass an object if there are
multiple values to be sent.
Also fixed an issue w.r.t the plugin architecture. Previously infinite
recursion would happen when more than one plugin was overriding a method.
Resolved now by using a wrapper function that lazily sets the correct super
method.
The __ translate method should only be run *after* converse.js has been
initialized and we know what the actual desired language is
Also fix bug in src/locales.js where wrong langs were assigned to wrong keys.
The ChatBox.show() method was being called for every invocation, 100ms after
the fact, instead of it being called only once.
Fixed that and also changed to call it at the start.
First component to remove is MUC which was moved to src/converse-muc.js
The components are written as plugins and use converse.js's plugin machinery.
Update the plugin docs somewhat with new insites found while working on the muc
plugin.