JC Brand
ad8d4c90b3
Fix failing test
2019-04-22 21:07:05 +02:00
JC Brand
725a382e3b
Refactor initialization and defaults for chat boxes
...
- Let box_id start with char for valid HTML.
- No need to use SHA1 for box id
- No need for the user_id attribute.
- Set nickname when we set the roster contact.
Also...
- _converse.api.contacts.get is now async
- _converse.api.chats.create is now async
2019-04-18 16:14:51 +02:00
JC Brand
f897703565
Rename emit
to trigger
for consistency with Backbone.Events
2019-03-29 21:56:56 +01:00
JC Brand
9f5031c278
Make converse.initialize
an async
function
...
- Combine all test init functions into `initConverse`
- Use `async` functions in more tests
- Replace `var` with `let` and `const` in more tests
- New utils method `toStanza` which converts a string to a Node
2019-02-12 15:34:50 +01:00
JC Brand
c22fe41aef
Use async/await in tests
2018-11-22 14:25:56 +01:00
JC Brand
d341c6a13b
Revert "Use getter to lazily create Strophe.Connection"
...
This reverts commit 7af73c3471
.
Doesn't look like the right approach for adding support for XEP-0156.
Work on that will continue in a branch in the meantime.
2018-11-20 17:31:53 +01:00
JC Brand
7af73c3471
Use getter to lazily create Strophe.Connection
2018-11-18 18:05:47 +01:00
JC Brand
d3a684a57d
Move some functions outside of the initialize
closure
2018-11-15 23:10:40 +01:00
JC Brand
9bc8bdf34c
Test updates after updating to use latest strophe.js
...
`toLocaleString` now returns element attributes in alphabetical order
(for better cross-browser consistency).
Also, `toLocaleString` is now used in favor of `outerHTML` because
browsers aren't consistent with one another in their output.
2018-10-03 21:11:20 +02:00
JC Brand
4c3645c559
Merge branch 'master' into converse-omemo
2018-08-03 14:47:20 +02:00
JC Brand
1443fdd447
(WIP) Wait for promises before opening chats in API methods
2018-08-01 11:10:43 +02:00
JC Brand
6785eff4a7
Merge branch 'master' into converse-omemo
2018-07-01 11:44:04 +02:00
JC Brand
596082eecc
Get tests to run agains the webpack build
2018-06-03 16:40:20 +02:00
JC Brand
6042c233bc
Add test that the OMEMO toolbar button renders
...
Fix and improve accordingly. updates #497
2018-05-23 12:51:01 +02:00
JC Brand
2f46bb8ce7
Fix failing tests
2018-03-14 23:10:31 +00:00
JC Brand
ca141401a0
Fix failing tests
2018-03-13 13:42:00 +01:00
JC Brand
4652385bb4
Remove jQuery from non-tests config
2018-01-04 12:11:03 +00:00
JC Brand
671691353a
Use Backbone.NativeView instead of Backbone.View
2018-01-03 20:41:03 +00:00
JC Brand
7850c38faa
disco: Create new plugin converse-disco
.
...
We can now support feature discovery for multiple entities (although we
currently still only query for the user's own XMPP server).
2017-07-21 15:09:50 +02:00
JC Brand
16d62bf9e4
Fix broken tests due to using ES2015 promises
2017-07-11 17:05:02 +02:00
JC Brand
f81a94baf1
Move updateSettings
to the private API.
...
Also add an API method for exposing new promises.
Update the plugin and API documentation, specifically concerning the above
changes.
2017-07-05 11:03:13 +02:00
JC Brand
02e5921415
Fix problem of stuck/hanging tests on TravisCI
2017-06-19 15:05:22 +02:00
JC Brand
6c262f7213
Various small changes to reduce (non-critical) errors during testing
2017-06-14 20:14:45 +02:00
JC Brand
0c61a5d791
core: Refactor common code into restoreBOSHSession
2017-05-11 10:42:10 +02:00
JC Brand
0c43e4b87c
Upgrade to Jasmine 2.5.3
2017-04-06 11:31:05 +02:00
JC Brand
cfb0cd0970
New defaults
2017-02-27 10:41:46 +00:00
JC Brand
f60b4fc268
auto_away
shouldn't change the user's status if it's set to dnd
...
Fixes #620
2017-02-25 09:52:31 +00:00
JC Brand
51fc401a24
Fix failing tests due to new defaults.
2017-02-17 09:45:34 +00:00
JC Brand
bc8e3e1a01
Return a Backbone.View object instead of a wrapper
...
When returning chat boxes via the API.
We can do this now because these API methods are only available to
(whitelisted) plugins.
2017-02-14 15:10:46 +00:00
JC Brand
fe6a9ca748
Merge converse-api and converse-core
...
Otherwise `require('converse-core')` can be called, exposing the inner converse
object.
2017-02-14 14:35:52 +00:00
JC Brand
a30cf931b8
Split API into public and private (plugin only) parts.
2017-02-02 20:09:52 +00:00
JC Brand
83feebb229
Two plugins changes
...
- Remove the `plugins.remove` API method.
- Throw an error when attempting to register multiple plugins with the same name.
2017-02-02 18:54:15 +00:00
JC Brand
b7b9711296
Rename the closured converse object to _converse
...
to indicate that it's private and to differentiate it from the outer "global"
converse object.
2017-02-02 18:34:13 +00:00
JC Brand
4dcb855562
Split API into public and private (plugin only) parts.
2017-02-02 18:30:59 +00:00
JC Brand
081f075aa9
Add eslint with lodash checking and apply its suggestions
2017-02-01 14:02:18 +01:00
Richard Icke
343e5777d1
first attempt to replace underscore with lodash
2017-02-01 14:00:38 +01:00
JC Brand
de07b6a529
No need for two AMD-load cycles.
2016-11-30 12:18:58 +00:00
JC Brand
9bf00241de
Updates #721 Restore sessions when logging in anonymously
...
together with keepalive.
2016-11-07 18:48:49 +01:00
JC Brand
a2f4acdcee
All tests suites now updated and isolated.
2016-11-03 13:59:05 +00:00
JC Brand
50275cce64
Remove shared state between tests
...
Only a small subset of tests currently working with this.
2016-11-03 13:59:05 +00:00
JC Brand
6ac4f2601d
Fixes #677 Chatbox does not open after close
...
Problem was a race condition between hide and show methods.
Solution was to not hide the chat box during the initialize method.
2016-08-12 20:38:39 +00:00
JC Brand
62c170273e
Allow plugins to have optional dependencies.
...
This change refactors out the plugin code from converse-core into
src/converse-puggable.js
Additionally, plugins now have an optional attribute `optional_dependencies`
which is an array of dependencies which are "nice-to-have" but not essential.
Work has also been done to ensure that a plugins' dependencies are first loaded
before the plugin itself.
2016-06-10 08:26:29 +00:00
JC Brand
6c99c51c74
New API method converse.rooms.close()
.
2016-06-03 08:41:13 +00:00
JC Brand
d2ee62da71
Make sure that there is a valid connection when login API is called
...
In the process I had to refactor some methods which required the mock
connection of tests to be changed as well.
2016-04-13 15:11:50 +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
da0c858fe0
Used debounce ineffectually. Fixed now.
...
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.
2016-02-16 07:47:16 +00:00
JC Brand
f779b9a3c0
Fixes #535 . Room doesn't get opened when mixed-case JID is used.
2016-01-15 08:49:19 +00:00
JC Brand
e835a25184
Add jshint checking and fix errors.
2015-10-25 17:55:18 +00:00
JC Brand
99c7b9cb95
Add a new emitted event: serviceDiscovered.
...
Gets thrown every time converse learns of a supported server service.
Useful when 3rd party code wants to use API methods that depend on the service
being discovered first.
2015-07-17 20:34:48 +02:00
JC Brand
b47069b4f6
Add, test and document an API method for setting the user's status.
...
fixes #367
2015-06-27 21:21:27 +02:00