Commit Graph

20 Commits

Author SHA1 Message Date
JC Brand
53b3f2d0d6 Fix failing tests and rewrite to use async/await 2018-10-26 12:53:24 +02:00
JC Brand
e181aaf99b Make the message view's render method async
So that we first render dynamic content (e.g. images) before inserting
it into the chat.

Also, add the `show_images_inline` setting (which is the cause of this
whole change).

Updated tests to handle this new change and start using async/await
instead of promise callbacks.
2018-10-15 22:19:04 +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
506aa33131 Wait for promises before opening chats in API methods 2018-08-01 11:12:00 +02:00
JC Brand
4115461409 Make tests independent of URL at which they're run 2018-07-31 19:13:49 +02:00
JC Brand
acd9a18696 Update with new message markup 2018-07-21 07:34:03 +02:00
JC Brand
bc872ee2cb Fix various failing tests and update Makefile 2018-06-04 11:20:34 +02:00
JC Brand
596082eecc Get tests to run agains the webpack build 2018-06-03 16:40:20 +02:00
JC Brand
5ffb09bd15 Updates #161: Treat sent files also as oob messages 2018-04-30 15:37:37 +02:00
JC Brand
a15c9e54d0 Also test for when XEP-0363 is not supported
Updates #161
2018-04-22 17:47:34 +02:00
JC Brand
d73394fa37 Add tests for XEP-0363 for MUC
Update #161
2018-04-22 17:30:49 +02:00
JC Brand
f785c2df0a Fix linting errors 2018-04-18 17:29:51 +02:00
JC Brand
d048cff9a8 Provide metadata of file being uploaded.
updates #161
2018-04-18 11:49:53 +02:00
JC Brand
133df99aec Honor the filesize restrictions of the XMPP server
updates #161
2018-04-18 11:35:33 +02:00
JC Brand
076ace3fad Parse and save jabberdata formdata from a disco#info result 2018-04-17 16:42:20 +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
584f293d05 Updated and refactored the work from @worlword
* Use Promises instead of callbacks
* Update to latest (Last Call) version of XEP-0363
* Move non-view specific methods to models instead
* Add more tests

updates #161
2018-04-17 15:21:09 +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
77a51cc2a6 Initial work on XEP-0363: HTTP File Upload 2018-04-14 07:36:24 +02:00