JC Brand
c3dac272f8
Replace moment with DayJS
2019-05-06 14:27:18 +02:00
JC Brand
9528276be2
Use native Date methods instead of moment
...
- Use native `getTime` method instead of moment's `valueOf`
- Use toISOString() instead of moment().format()
This makes the code timezone independent since we're now globally using UTC.
2019-05-06 10:28:03 +02:00
JC Brand
15b2273631
_converse.api.archive.query
now returns a Promise
...
instead of accepting a callback functions.
2019-05-03 19:47:49 +02:00
JC Brand
33600eeece
No need for a separate archive_id
value.
...
With MAM2 we can just use stanza-id
2019-03-07 16:45:00 +01:00
JC Brand
7dd21880ed
Fix failing tests
...
Don't assume order of CSN messages, since `getLastMessageDate` ignores
CSN messages, they sometimes get add above one another.
2019-03-01 12:58:49 +01:00
JC Brand
ce2ae87df2
Bugfix. Open groupchats not shown when logging in after disconnection
...
* 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.
2019-02-20 23:08:27 +01:00
JC Brand
253958ed93
Prevent duplicate messages by comparing MAM archive id to XEP-0359 stanza ids
2019-02-19 23:08:29 +01:00
JC Brand
d830bc1250
Also check for duplicates in one-on-one messages
2019-02-14 15:17:49 +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
5f00987578
Bugfix. Pass original_stanza to isDuplicate
2018-12-06 13:10:33 +01:00
JC Brand
79bfb45639
Use async/await in MAM code and tests
2018-12-06 13:10:33 +01:00
JC Brand
c583678c86
Use _coverse.api.sendIQ
instead of _converse.connection.sendIQ
...
So that we know an event will be emitted when the stanza is sent.
2018-10-25 18:29:29 +02: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
ca9229a906
createMessage
now returns a promise.
...
Also, fix all broken tests, mostly related to this.
2018-08-18 17:12:22 +02:00
JC Brand
596082eecc
Get tests to run agains the webpack build
2018-06-03 16:40:20 +02:00
JC Brand
1405d9cb49
Also style file upload and action messages.
2018-04-30 15:37:37 +02:00
JC Brand
a9d2881888
Fix disco hierarchy
...
Previously we kept all entities and their items (which are also
instances of _converse.DiscoEntity) in a flat array.
Instead, we should have a tree-like structure where items are stored
on the relevant entity (and recursively on other items).
2018-04-14 07:36:24 +02:00
JC Brand
9528d81c00
Move various MUC methods onto the Backbone.Model
...
To more cleanly separate views and models and to make MUC in headless
mode more viable.
Refs #1032
2018-04-10 18:59:02 +02:00
JC Brand
bf97ffd381
Check JIDs of archived MAM messages
2018-01-21 22:02:12 +01:00
JC Brand
cac04d076a
Remove jquery as a dependency in MAM spec
2018-01-21 19:50:19 +01:00
JC Brand
31e884f79a
Add code to check for duplicates
2018-01-09 22:06:53 +00:00
JC Brand
4652385bb4
Remove jQuery from non-tests config
2018-01-04 12:11:03 +00:00
JC Brand
439e37feaa
disco: Refactor service discovery and add tests.
...
* `disco#items` are now only fetched when advertised by the entity.
* `identity` information is now also stored on the `DiscoEntity` model.
2017-07-21 17:38:08 +02: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
713e49b095
Fix failing tests
2017-07-19 09:14:02 +02:00
JC Brand
16d62bf9e4
Fix broken tests due to using ES2015 promises
2017-07-11 17:05:02 +02:00
JC Brand
095e7add86
mam: Upgrade MAM support to version 2
2017-06-23 22:58:47 +02:00
JC Brand
02e5921415
Fix problem of stuck/hanging tests on TravisCI
2017-06-19 15:05:22 +02:00
JC Brand
0c43e4b87c
Upgrade to Jasmine 2.5.3
2017-04-06 11:31:05 +02: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
6d2a38a7c1
Fixes #486 Update docs and fix failing test.
2017-02-12 19:01:07 +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
JC Brand
de07b6a529
No need for two AMD-load cycles.
2016-11-30 12:18:58 +00:00
JC Brand
a2f4acdcee
All tests suites now updated and isolated.
2016-11-03 13:59:05 +00:00
JC Brand
561c138edd
Bugfix. Allow multiple MAM queries to be made simultaneously.
2016-07-28 18:01:37 +02:00
JC Brand
1676258c38
Move the MAM features to a separate plugin.
2016-03-14 14:04:36 +00:00
JC Brand
e835a25184
Add jshint checking and fix errors.
2015-10-25 17:55:18 +00:00
JC Brand
2cc76c3af7
Type attribute on data forms is mandatory. updates #306
...
See here:
https://github.com/strophe/strophejs-plugins/pull/65
2015-07-29 14:35:07 +02:00
JC Brand
1dbe0ed8de
Trying to work around timezone issues.
...
Causing tests to fail on Travis.
2015-07-21 23:18:03 +02:00
JC Brand
5eea22f245
More work on showing archived chatroom messages.
...
updates #306
2015-07-21 20:10:31 +02:00
JC Brand
087718d7f0
Expand a test case to also check for received archived messages.
...
updates #306
2015-07-13 23:16:21 +02:00
JC Brand
1a9771c717
Test code which receives archived messages and calls callback
...
updates #306
2015-07-12 23:58:07 +02:00
JC Brand
27afd32aeb
Test that archive.query takes a Strophe.RSM object.
...
updates #306
2015-07-12 22:00:32 +02:00
JC Brand
69de033cea
Write documentation for the archive API. Also add another test.
...
update #306
2015-07-12 21:27:22 +02:00
JC Brand
9abbd1e8f0
Allow a Strophe.RSM object to be passed in to archive.query.
...
updates #306
2015-07-11 14:55:02 +02:00
JC Brand
1261a2525d
Use Strophe.RSM for result set management.
2015-07-11 12:03:20 +02:00
JC Brand
b77d76b364
Started adding the API for querying archived messages.
2015-07-11 06:36:44 +02:00
JC Brand
eeeaddbe04
Add the ability to read and set MAM preferences.
2015-07-10 15:24:13 +02:00