Commit Graph

77 Commits

Author SHA1 Message Date
JC Brand
99432eebd9 I think this fixes #1160
Don't included MAM data form if there's nothing to filter
2018-09-06 16:56:13 +02:00
JC Brand
866f2737da More JSDoc docstrings for API methods 2018-09-02 23:43:39 +02:00
JC Brand
e7f211bacf Avoid an unnecessary promise and create message as soon as possible
under non-OMEMO circumstances. Otherwise, when messages are fetched in
bulk via MAM, then a message referring to a previous one (e.g.
a correction) may be processed before the message being referred to has
been created.
2018-08-19 10:32:43 +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
b4110dc162 Merge branch 'master' into converse-omemo 2018-08-18 10:24:55 +02:00
JC Brand
8d40d5f108 Bugfix. Stanza passed in as 2nd parameter 2018-08-08 09:43:32 +02:00
JC Brand
f2c283c907 More work on decrypting messages 2018-08-04 19:41:06 +02:00
JC Brand
ec65bb3512 createMessage doesn't need the delay parameter 2018-06-07 12:37:56 +02:00
JC Brand
eed141b53e Remove unnecessary path aliases from the webpack config 2018-06-06 11:04:23 +02:00
JC Brand
38499917a9 updates #194
Include entity capabilities hash in outgoing presences

Also, started some work on using jsdoc for rendering API documentation.
Ideally that would go into a separate commit but that would take ages to
untangle.
2018-05-11 13:35:27 +02:00
JC Brand
b3619077f9 Remove dependency on the strophe disco plugin
And instead implement it ourselves.

This solves a bug with that plugin whereby the connection handlers are
added to early and are therefore never fired.

Also fixed a problem whereby entity items are queried for features
before the features have been fetched.
2018-05-07 18:06:50 +02:00
JC Brand
bbf33a8e4f Combine duplicate queryForArchivedMessages methods 2018-05-07 13:49:32 +02:00
JC Brand
dbee62c794 Do disco check in fetchArchivedMessages
so that it's applied in all cases where archived messages are fetched.
2018-05-07 13:14:58 +02:00
JC Brand
d42b872795 Check if room supports MAM before qyerying
instead of wrongly checking the bare JID
2018-05-07 13:07:44 +02:00
JC Brand
911ede2886 Small bugfixes.
- Filter did the opposite of what it was supposed to do
- Wrong bind context
- Should actually be mam:2, issue was server misconfiguration
2018-05-02 14:30:14 +02:00
JC Brand
afc924fd72 Bugfix. Since refactoring we do want onMessage to handle MAM messages 2018-05-01 19:46:18 +02:00
JC Brand
c01e9f8265 Move methods from chatbox view to message view
Specifically the methods related to requesting an upload slot and uploading a file.
Also show a progress indicator while a file is being uploaded.

Updates #161
2018-04-17 15:21:38 +02:00
JC Brand
042c1947ed Add file-upload button 2018-04-14 07:40:07 +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
0013ee5506 Split MUC views into separate file/plugin 2018-03-05 16:32:13 +01:00
JC Brand
fc560bf8ac Use this.content instead of ev.target, which is null
when using converse.js inside a webcomponent
2018-02-14 12:30:30 +01:00
JC Brand
03b9447f1d Asynchronously render spoiler button only if all clients support it 2018-02-08 17:48:15 +01:00
JC Brand
c1322f3c92 or should be and 2018-01-22 10:41:13 +01:00
JC Brand
12af9d5cbd Tying some loose ends 2018-01-22 09:53:35 +01:00
JC Brand
bf97ffd381 Check JIDs of archived MAM messages 2018-01-21 22:02:12 +01:00
JC Brand
93da96ad91 converse-mam: Use API internally 2018-01-16 12:20:18 +01:00
JC Brand
35275c8add Lazily show spinner at the last moment 2018-01-15 18:40:35 +01:00
JC Brand
fdf1a977eb Bugfix. Fall back to normal query when no messages 2018-01-11 22:48:18 +00:00
JC Brand
c22aff9b13 Use newest pluggable.js.
`optional_dependencies` is now called `dependencies`
2018-01-10 13:13:26 +00:00
JC Brand
31e884f79a Add code to check for duplicates 2018-01-09 22:06:53 +00:00
JC Brand
6414981012 Need to only fetch newer messages after cached messages 2018-01-09 22:05:02 +00:00
JC Brand
e360d9eead Removed jquery from converse-chatview 2018-01-02 21:52:55 +00:00
JC Brand
aa7483a881 Initial work on allowing a headless build 2017-12-22 21:24:15 +00:00
JC Brand
fb35ed844a Avoid flashing when opening chat room. 2017-12-20 11:02:46 +00:00
JC Brand
a0ba972468 Handle case where <set> element is not returned 2017-12-19 16:32:23 +00:00
JC Brand
063908e032 Append spinner when fetching newer messages 2017-12-02 15:09:04 +01:00
JC Brand
4df61cc496 After reconnection, fetch new messages for private chats 2017-12-02 14:26:28 +01:00
JC Brand
c26ccf5e01 Remove jQuery as dependency for converse-mam.
Also, if a message has no `archive_id` attribute, then do a time-based MAM query.
2017-12-02 14:26:28 +01:00
JC Brand
a6f2877ed9 Disco API refactoring
This came out of the desire to let `converse-muc` use the API to
determine whether MUC is supported. However, we don't know the entity
JID before hand and I couldn't think of a good way to query all current
and future entities for a feature.

So `converse-muc` still does it's own thing without the API, but some
refactoring came as a result of attempting.
2017-11-10 21:37:35 +01:00
JC Brand
042a26d05d New API method _converse.disco.supports
to check whether a certain service discovery feature is supported by an entity.
2017-11-02 23:23:01 +01:00
JC Brand
dffc6fbb50 Throw more helpful error when there's no connection 2017-10-23 12:18:00 +00:00
JC Brand
02a055d31d Bugfix. Query user's JID for mam:2 support, not the domain 2017-08-08 22:09:17 +02:00
JC Brand
084d9914b0 muc: Refactored how MAM messages are fetched.
Listen for the `afterMessagesFetched` event.
Wait until `discoInitialized` before fetching.
Add `fetchArchivedMessagesIfNecessary` method(s).
2017-07-21 15:09:50 +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
6ef0536e31 Some work on using es6 promises 2017-07-10 21:14:48 +02:00
JC Brand
9a9eae3fcf Use esnext to auto-generate es2015 syntax 2017-07-10 17:46:22 +02:00
JC Brand
5ab1693136 logging: Add deprecation warning for updateSettings
and also use the Strophe.LogLevel levels for logging in general.
2017-07-05 11:33:55 +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
095e7add86 mam: Upgrade MAM support to version 2 2017-06-23 22:58:47 +02:00