- Move headless one-on-one chat functionality into converse-chat
- Split converse-headline into converse-headlines and converse-headlines-views
- Add api in `_converse.api.chatboxes` for creating chatboxes
- Add `_converse.api.controlbox.get` method
This changes the API method's current behavior by not automatically
maximizing (in `overlayed` view mode) or bringing a background chat into
foreground (in `fullscreen` view mode). Instead `force` needs to be set
to `true` for that to happen.
* Replace `tearDown` overrides with event handlers.
* Move presence listeners to `connected` event handler, otherwise they
don't get called when logging in again after disconnection.
* Add `clearSession` listeners to clean up upon disconnection.
* Use `Promise.all` instead of listening for multiple events.
We distinguish between UniView and MultiView instances.
UniView means that only one chat is visible, even though there might be multiple ongoing chats.
MultiView means that multiple chats may be visible simultaneously.
The `_converse.session` store gets cleared after logout, but we want the
`trusted` flag to persist after logout.
Also update the documentation no that the `storage` config option has
been removed in favor of `trusted`.
So that it persists across page loads. Otherwise storage falls back to
the default, causing records to be in both local- and sessionStorage.
Additionally, update singleton models to have the 'id' available as a getter.
Otherwise multiple records gets stored in browserStorage, causing random
results being returned.
And use it instead of listening to multiple Promises.
Promises get resolved once, which means using them doesn't work for
cases where the user logs out, and then in again (because the handlers
don't get called upon 2nd login).
Removed `_converse.chatboxviews.showChat` and trying to simplify how
chats are created and when they're shown.
Prompted by the work to split the MUC views into a separate plugin