Commit Graph

93 Commits

Author SHA1 Message Date
JC Brand
374260242c Variable interpolation bugfix 2019-01-28 13:27:25 +01:00
JC Brand
3c0e3d3fab Refactor out createMessage.
Changes:

* Avoids leaky abstraction of MUC code into converse-chatboxes
* Avoid creating unnecessary message objects (e.g. without <body)
* Add fix for #1369.
* Rename spec/chatroom.js to spec/muc.js
2019-01-28 13:27:25 +01:00
Christoph Scholz
9eee13e192 fix direct invite for membersonly room 2019-01-22 10:41:59 +01:00
JC Brand
a2f42d27a2 New release 4.1.0 2019-01-11 18:49:37 +01:00
Lynesth
df7d663b1d Force avatar refetch if new hash received
Fixes #1334
2019-01-11 17:39:49 +01:00
Lynesth
7e370c1b81 Fix send_chat_state_notifications option for MUCs
Fixes half of #1337.
2019-01-11 17:32:23 +01:00
JC Brand
dc07440de8 Bugfix. Don't create chats for messages without body 2019-01-10 21:47:50 +01:00
JC Brand
58c29ea26b Bugfix. Make sure to refresh
Otherwise we get an empty collection of features (due to features being
queried for a non-existent MUC)
2019-01-10 13:22:15 +01:00
JC Brand
01f0a65209 Reject the waitUntilFeaturesDiscovered promise if query failed
No code relies on this currently, but it's seems the right thing to do
2019-01-10 13:21:06 +01:00
JC Brand
96f38150f9 Use async/await and don't swallow errors.
Also, handle the error in `getRoomFeatures`
2019-01-10 13:16:08 +01:00
JC Brand
a4d608dcdf Save room features in separate model
As a namespacing mechanism to avoid clashes.
Fixes bug where two chats are shown as currently being active in the rooms list.
2019-01-10 12:15:59 +01:00
JC Brand
e6c66cfebd Ability to republish if publish-options precondition not met 2018-12-21 06:29:22 +01:00
JC Brand
d051085626 Only clear textarea once message was sent
This now requires `sendMessage` to return a boolean to indicate success.
Disable the textarea while message is being sent.
2018-12-21 05:58:22 +01:00
JC Brand
0b25800392 Add converse-pubsub.js 2018-12-20 21:51:16 +01:00
JC Brand
f64fdb8088 Render the OMEMO lock icon in MUC toolbars as well
updates #1180
2018-12-20 21:51:16 +01:00
JC Brand
4a65e39804 Set default to avoid includes being called on undefined 2018-12-17 15:29:21 +01:00
Christoph Scholz
d2d64952a0 set store hint on receipts and type='chat' 2018-12-17 15:20:21 +01:00
JC Brand
82bfe66cac Simplify setting of MUC features.
We don't need an event handler that sets the "opposite" features to
false if we set all features properly in getFeatures
2018-12-17 15:18:20 +01:00
JC Brand
94bcba741b Handle non-elements, like text nodes 2018-12-17 15:17:53 +01:00
JC Brand
9c812157ee Use async/await 2018-12-17 15:16:43 +01:00
JC Brand
aed1c60e86 Still trying to fix travis issue.
Stop listening on the _converse obj sooner
2018-12-17 12:09:56 +01:00
JC Brand
49efe390f9 Fix typo 2018-12-17 11:42:43 +01:00
JC Brand
d5e89655dc Still check the view mode since the trimChats method is debounced 2018-12-16 11:32:19 +01:00
JC Brand
a389f52adb Fixes #1353 Don't expect delivery receipts to have type chat 2018-12-16 11:22:13 +01:00
Christoph Scholz
216a684904 prevent message delivery receipts for carbons and own 2018-12-15 20:04:31 +01:00
JC Brand
6ec183451d Remove global event listener when appropriate.
Otherwise trimChats called in `fullscreen` tests (due to being
registered in a previous test)
2018-12-15 20:01:19 +01:00
JC Brand
9ff505fd66 Add unregisterGlobalEventHandlers method
And call it when `converse.initialize` gets called again
2018-12-15 20:00:36 +01:00
JC Brand
003af0c438 visibilitychange is supported by all browsers we support
So simplify the code that saves the window state
2018-12-15 19:59:30 +01:00
JC Brand
d5485d09ae Always render the OMEMO lock icon
When OMEMO isn't possible, render it as grey.

This change makes OMEMO for MUCs easier, since there I anticipate that
OMEMO support might change dynamically based on who enters/exits the
room.

updates #1180
2018-12-14 11:25:57 +01:00
JC Brand
5dacb96b78 Don't try to create ChatBox from controlbox data in embedded mode
updates #1374
2018-12-12 18:52:41 +01:00
JC Brand
e38daf34f7 Remove coupling between converse-chatboxes and converse-roster
In embedded mode (singleton) we don't need or want the roster, so we
should be able to disable it.

updates #1374
2018-12-12 18:52:40 +01:00
JC Brand
02c907128c Fix regex for setting the version number.
updates #1366
2018-12-07 13:55:41 +01:00
JC Brand
384f1d7977 New release 4.0.6 2018-12-07 12:40:02 +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
118bc20478 Rename isSingleton to isUniView
We distinguish between UniView and MultiView instances.

UniView means that only one chat is visible, even though there might be multiple ongoing chats.
MultiView means that multiple chats may be visible simultaneously.
2018-12-04 13:50:15 +01:00
JC Brand
f051ff283b Don't store vcards globally to all accounts. 2018-11-30 19:43:40 +01:00
JC Brand
6358fd7c97 Use finally 2018-11-29 10:41:46 +01:00
Christoph Scholz
267d91a4f3 don't send receipt requests in MUCs 2018-11-20 17:38:59 +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
c46d937ea4 Fix null check 2018-11-18 15:16:40 +01:00
JC Brand
67958bba40 Check xmlns 2018-11-17 18:58:23 +01:00
Christoph Scholz
8524ff3b99 Fix missing checkmarks in old muc messages 2018-11-17 18:52:52 +01:00
Emmanuel Gil Peyrot
223deaa782 Log the actual error on MAM error 2018-11-17 18:39:28 +01:00
JC Brand
d3a684a57d Move some functions outside of the initialize closure 2018-11-15 23:10:40 +01:00
JC Brand
588b015e62 Release v4.0.5 2018-11-15 13:24:22 +01:00
JC Brand
5109c845ef Add language support for Galician 2018-11-15 12:25:31 +01:00
JC Brand
35a1693ade Use es2015 module imports in i18n.js 2018-11-15 11:51:43 +01:00
JC Brand
01c3d35db2 Remove unnecessary webpack aliases 2018-11-15 11:29:28 +01:00