Commit Graph

322 Commits

Author SHA1 Message Date
JC Brand
4c6bd1f49c Cleaner separation between minimize/trimming feature and core
One visible effect is that when this component is now removed,
minimize buttons are not visible on the chat boxes.

updates #622
2016-03-31 08:40:25 +00:00
JC Brand
2cbf20c6db Add the ability to fetch credentials for auto_login
via the new config option credentials_url
2016-03-31 08:38:43 +00:00
JC Brand
8e3c97ae61 Some fixes to minimization of chats. Updates #622
Don't call trimChats in onChatBoxAdded event. Reduntant because it will be
called after maximization and after being shown.

Add new method getShownChats and don't trim if only one or zero chats are being
shown.

Don't trim chats when in responsive mode.

Don't call trimChats unnecessarily in the render method of the trimmed chats
thingy.
2016-03-30 12:18:45 +00:00
JC Brand
868aacb2fc Controlbox fix. Make sure to initialize the view again. 2016-03-29 15:41:27 +00:00
JC Brand
bd576c74d2 Fix. Looks like it's better to have it a function. 2016-03-29 15:41:06 +00:00
JC Brand
3815d77cc1 Make 'connected' an attribute. 2016-03-29 13:57:33 +00:00
JC Brand
a6b6ad5e9e Add 'connection' API grouping and 'connected' API method. 2016-03-29 13:41:10 +00:00
JC Brand
556d264747 Remove "optimization" code no longer used or relevant. 2016-03-29 11:50:50 +00:00
JC Brand
2eb727f9f1 Bugfix. stanza name is passed in separately. 2016-03-29 09:48:49 +00:00
JC Brand
2869485c1e Fixes to trimming of chats.
- Don't trim if not connected.
- Move trimChats call to converse-minimized
- Immediately hide view to avoid race conditions.
2016-03-28 14:59:23 +00:00
JC Brand
8f601e8c94 Found more stuff in core that should go to converse-minimize 2016-03-28 14:08:50 +00:00
JC Brand
ed4b9a85cc Remove ChatBox views when they get closed.
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.
2016-03-28 12:23:36 +00:00
JC Brand
f353fe8611 Bugfix for headline messages.
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.
2016-03-28 10:51:32 +00:00
JC Brand
b3e9a177e2 Merge pull request #617 from lixmal/master
Remove split of fullname. Fixes #609
2016-03-28 10:28:38 +02:00
JC Brand
95b81f13c1 Add support for showing headline messages in notifications 2016-03-22 08:45:54 +00:00
JC Brand
946e9fed5d Add new MUC option auto_join_rooms.
Fixes #156
2016-03-22 08:15:52 +00:00
JC Brand
fc7f50887a Refactored MUC plugin to not have to override ChatBoxes collection.
Instead we use event handlers.
2016-03-22 07:49:25 +00:00
JC Brand
1f2840035b Bugfix. contact is a map, not a Backbone.Model 2016-03-22 07:15:48 +00:00
JC Brand
b18059fc04 Bugfix. We no longer use the 'chatroom' bool 2016-03-21 11:33:34 +00:00
JC Brand
d3c97486dd Work around Prosody not properly setting type for headline messages 2016-03-21 10:40:52 +00:00
JC Brand
a4c4d6d2d3 Don't break when roster is not defined 2016-03-21 10:40:47 +00:00
JC Brand
2d846961c2 Use 'type' = 'chatroom' instead of 'chatroom' boolean. 2016-03-21 10:00:15 +00:00
JC Brand
3aefba3200 Change ping plugin to not have to use overrides.
Had to add a `reconnect` event to core.
2016-03-21 10:00:15 +00:00
JC Brand
82aa9fec2c Support for showing headline messages. 2016-03-21 10:00:10 +00:00
Viktor Liu
ad036ea75f Remove split of fullname. Fixes #609 2016-03-20 01:47:51 +01:00
JC Brand
8e18d736b4 fixed indentation of comments 2016-03-19 22:16:00 +00:00
JC Brand
fa69bb1b0a trimChats called in converse-minimize. Return the view. 2016-03-19 21:56:55 +00:00
JC Brand
55593245f3 converse-otr should depend on converse-minimize
Also generated new dist files.

updates #616
2016-03-19 13:34:03 +00:00
JC Brand
ae6a7f4b02 Option to ignore certain JIDs' chat state notifications 2016-03-18 09:11:43 +00:00
JC Brand
9a449e3615 comment indentation 2016-03-18 08:49:32 +00:00
JC Brand
a2b8d04d84 Move config settings to the relevant plugins 2016-03-18 08:12:23 +00:00
JC Brand
37001a9bc6 Also send out presence stanza when setting it via API 2016-03-17 05:38:52 +00:00
JC Brand
d3767426f6 Allow stanza listener to be registered without options obj 2016-03-16 18:31:55 +00:00
JC Brand
36a875a402 Add stanza-specific event listener.
Therefore removing the `presence` event again.
2016-03-16 18:12:11 +00:00
JC Brand
1c961ab4d1 Emit an event presence when a presence stanza is received. 2016-03-16 15:59:07 +00:00
JC Brand
302c8d42d8 Move VCard stuff from converse-rosterview to converse-vcard 2016-03-16 13:50:52 +00:00
JC Brand
6506d4745a Call initialized event once everything in core has been set up 2016-03-16 13:50:35 +00:00
JC Brand
2173359718 Set dataType JSON of ajax request of prebind_url 2016-03-16 12:56:11 +00:00
JC Brand
e461b22ff9 disconnect and reset before attempting to reconnect. 2016-03-16 12:44:59 +00:00
JC Brand
08222182c5 Move VCard functionality into separate plugin 2016-03-16 11:21:27 +00:00
JC Brand
5651f76373 Bugfix. onConnected overrides need to return promise. 2016-03-16 10:10:50 +00:00
JC Brand
6618d694b1 No need to override ChatBoxView with MUC-specific method 2016-03-16 09:03:00 +00:00
JC Brand
2fa39f2150 Move dependencies to the plugins that actually use them 2016-03-16 09:02:12 +00:00
JC Brand
df99fa8c0d Use rel=noopener with links that contain target=_blank...
to prevent potential phishing attacks.

More info here: https://mathiasbynens.github.io/rel-noopener
2016-03-16 08:52:45 +00:00
JC Brand
3fd2225fae Don't try to restore if rid, jid and sid are passed in.
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.
2016-03-15 18:09:50 +00:00
JC Brand
49d58d321c Fix timing bug with minimized_chats not being available in time 2016-03-14 17:20:21 +00:00
JC Brand
eff2335624 Bugfix. Wrong function signature 2016-03-14 17:07:01 +00:00
JC Brand
80c26e708c Add new option strict_plugin_dependencies 2016-03-14 17:03:48 +00:00
JC Brand
45bc7f1180 Remove the need to depend on converse-controlbox and converse-chatview 2016-03-14 17:03:14 +00:00
JC Brand
9d9f64b2c3 declare namespace in relevant plugin 2016-03-14 16:46:04 +00:00