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
JC Brand
7039dbe01b
Move chat minimization to a separate plugin
2016-03-14 16:38:43 +00:00
JC Brand
fc251db59e
Let MUC plugin override the chatbox wrapper.
2016-03-14 16:02:43 +00:00
JC Brand
82107c0d96
Don't ever remove the _super obj
2016-03-14 15:59:33 +00:00
JC Brand
e87731f6b3
Remove unused var declarations
2016-03-14 14:31:03 +00:00
JC Brand
1676258c38
Move the MAM features to a separate plugin.
2016-03-14 14:04:36 +00:00
JC Brand
df3bcad0b3
Move roster view code into a separate plugin
2016-03-14 14:04:36 +00:00
JC Brand
f55b593791
Use the new plugin helper method updateSettings
2016-03-14 14:04:36 +00:00
JC Brand
fe47773c7f
Move ChatView into separate plugin.
2016-03-14 14:04:36 +00:00
JC Brand
a1b31cd1ed
Initial work on adding support for headline messages.
2016-03-14 14:04:31 +00:00
JC Brand
8b459c68b1
Call trimChats in the show method of the box view
...
Not in the onAdded handler.
2016-03-09 11:03:06 +00:00
JC Brand
d192b34919
onChatBoxFetched renamed to onChatBoxesFetched
2016-03-09 10:54:50 +00:00
JC Brand
6eb08bd42f
Bugfix. show method must be debounced per instance
...
Otherwise it gets debounced for multiple instances and certain chat boxes will
then not get shown.
2016-03-09 10:53:39 +00:00
JC Brand
d893d9782a
Improvement in when trimChats gets called
...
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'
2016-03-09 10:26:14 +00:00
JC Brand
7484259024
Bugfix, need to return the chatbox
2016-03-09 10:01:20 +00:00
JC Brand
8b30c60592
Call minimize() not hide() when minimizing
2016-03-09 10:00:28 +00:00
JC Brand
ce9008a56a
Rename onShow to onMaximized and add onMinimized
2016-03-09 09:59:25 +00:00
JC Brand
7b2f75ec72
Updated trimChats slightly.
2016-03-09 09:58:22 +00:00
JC Brand
2dbe2fc5a3
Bugfix. Need to set the context when calling a _super method
2016-03-09 08:39:04 +00:00
JC Brand
c793b846fb
Only ask for permission once the user is already logged in
...
updates #443
2016-03-08 22:36:13 +00:00
JC Brand
02faa555bb
Recreate dist files. fixes #443
2016-03-08 12:16:26 +00:00
JC Brand
550f7827bf
Bugfix. Contact wasn't being sent. updates #443
2016-03-08 12:11:35 +00:00
JC Brand
d92645c8d3
Show a desktop notification when a contact request is received
...
updates #443
2016-03-08 11:04:10 +00:00
JC Brand
0aa0c02124
Add tests for src/converse-notification.js. updates #443
...
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).
2016-03-08 10:44:27 +00:00
JC Brand
9aed64d4bf
updates #603 .
...
prevous fix wasn't correct. Rename handlers to make it clear which methods are
the event handlers, put them together and make sure docstrings are relevant.
2016-03-08 08:44:45 +00:00
JC Brand
d4c127e196
Fixes #608
...
The no-jquery build was broken
2016-03-07 17:52:36 +00:00
JC Brand
fd0c9cecb7
Log the err and call with null, then return.
2016-03-07 17:26:31 +00:00
JC Brand
efa4a9ff23
Fixes #577 Add a timeout config var for MAM
2016-03-07 17:16:57 +00:00
JC Brand
4a9146460d
Fix random fails in FF due to different module loading times
...
According to the require.js documentation, if you are using "require" in HTML,
then the data-main attribute should not be used.
http://www.requirejs.org/docs/api.html#data-main
So merged main.js into converse.js, which appears to solve the problem.
2016-03-07 16:35:08 +00:00
JC Brand
4624cc2dc7
Fixes #603
...
Method has new arg signature now that it's an event handler
2016-03-07 16:10:27 +00:00
JC Brand
c2212833a1
Fixes #607 , view.model is undefined.
2016-03-07 14:29:45 +00:00
JC Brand
3690d1c205
Fix. Used the wrong listenere.
2016-03-01 22:40:19 +00:00
JC Brand
23a1dc4f2b
Some fixes concerning event emitting.
...
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.
2016-03-01 22:39:45 +00:00
JC Brand
f7725943f8
Emit an event 'contactRequest' when a subscription request is received
2016-03-01 21:57:49 +00:00
JC Brand
8665c0ac1c
Bugfix in converse-ping. this
was wrong context.
2016-03-01 21:40:49 +00:00
JC Brand
bc42d50a86
Update docs to mention desktop notifications. updates #443
2016-03-01 09:43:44 +00:00
JC Brand
26cb98d963
Move playing of sounds to the notification plugin.
...
Also add a config setting for the icon shown in HTML5 notificatins.
updates #443
2016-03-01 08:58:36 +00:00
JC Brand
9cce0ff6ae
Add plugin settings to default settings.
...
So that they are retrievable via the API.
2016-03-01 08:57:57 +00:00
JC Brand
14c66ff755
Also show HTML5 notifications for chat state changes.
...
updates #443
2016-02-29 21:59:56 +00:00
JC Brand
578ca540b3
Move RosterContact and RosterContacts back into core.
...
They're independent of the controlbox and used by other core functions.
2016-02-29 21:29:05 +00:00
JC Brand
7f5962a177
Add plugin for HTML5 notifications. updates #443
2016-02-29 20:59:11 +00:00
JC Brand
cd731ed699
Some refactoring to make plugins easier.
...
- Refactored sound notification to make it a bit more generic
- Split up onMessage
2016-02-29 20:54:34 +00:00
JC Brand
4ebed3c995
We still need the roster in core, so set it there.
...
Still have to move the roster code out of src/converse-controlbox.js
2016-02-29 20:05:01 +00:00
JC Brand
9fb1c2383e
Bugfix. Restore code to get locale from browser.
2016-02-29 20:03:45 +00:00
JC Brand
dcd090ff31
Rip out the controlbox code and put it in src/converse-controlbox.js
...
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.
2016-02-29 16:40:51 +00:00
JC Brand
9ae2f71747
Found more chatroom specific code in converse-core.js
2016-02-29 16:40:51 +00:00
JC Brand
c0c4cd9272
Rename builds directory to dist
...
To conform with how many other projects name their directories.
2016-02-28 09:00:22 +00:00
JC Brand
9f9b38f852
Some i18n fixes
...
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.
2016-02-28 08:45:36 +00:00
JC Brand
c370b3e989
Remove the config file for the no-OTR build.
...
Custom builds like this should rather be done by removing components in
converse.js and then running `make build`
2016-02-28 08:29:23 +00:00
JC Brand
d00f2d1c3d
Figured out how to exclude the locales from the no deps build
2016-02-28 00:53:44 +00:00
JC Brand
fb2e5e27c7
Let the utils work without Jed available.
2016-02-28 00:37:38 +00:00
JC Brand
9d104f17e6
Remove unused dependency in src/locales.js
2016-02-28 00:36:51 +00:00
JC Brand
21a501ca68
Rename src/templates.js to src/converse-templates.js
2016-02-28 00:33:50 +00:00
JC Brand
7e8a11df88
Some cleanup refactoring of how stuff is built.
...
Strophe.ping.js was still in the no-dependencies build
Also clean up wrapper-end.js a bit as well as the grouping of dependencies in
non_amd.html
Remove locales from utils.js and include it in converse.js so that the locales
can more easily be removed from the build.
2016-02-28 00:33:24 +00:00
JC Brand
77a563955e
Move build instructions from Gruntfile to Makefile
...
Also, remove build-no-locales-no-otr.js
2016-02-27 15:57:30 +00:00
JC Brand
16cdd4444e
Fix JSHint issues.
2016-02-26 18:23:30 +00:00
JC Brand
a392f3b769
Fix build of converse.js (build with all deps)
2016-02-26 17:35:01 +00:00
JC Brand
ba05d4e779
Add a build step to create a build of only the converse.js modules
...
This is now used in non_amd.html and means that the individual converse.js
modules don't need to support the non-AMD case.
2016-02-26 17:28:18 +00:00
JC Brand
e68c51d2fa
Explicitly list dependencies for modules
...
Instead of using the deps-*.js files. Builds will currently break, they still
need to be reworked.
Also moved the refreshWebkit method to utils.
2016-02-23 07:15:37 +00:00
JC Brand
e79c204241
Refactor the API out into a separate module, src/convers-api.js
...
Plugins are now also updated so that they can get the closured converse object
directly and don't need to rely on _super.
2016-02-20 15:06:12 +00:00
JC Brand
8bf8c318aa
Merge pull request #600 from davec82/master
...
change xmpp status also on icon-status click
2016-02-20 10:22:41 +01:00