Commit Graph

117 Commits

Author SHA1 Message Date
JC Brand
8d00294681 Use origin-id to check for reflected messages.
Also, store the returned `stanza-id` on the message.
2019-02-14 11:33:28 +01:00
JC Brand
6eb05be4be XEP-0359: Better usage of stanza-id to check for dupes 2019-02-13 22:14:58 +01:00
JC Brand
5b25d5daaa Don't send markers to someone not on your roster
Updates #324
2019-02-13 19:32:02 +01:00
JC Brand
370c4c84d9 Use async/await instead of explicit promises 2019-02-13 15:49:51 +01:00
JC Brand
4c83a23382 Revert "Reject the waitUntilFeaturesDiscovered promise if query failed"
This reverts commit 01f0a65209.

Updates #1410
2019-02-13 15:44:17 +01:00
JC Brand
2c9c11e971 onMessage improvements.
Don't check for older messages with same msgid
we can't rely on a message's `id` attribute being unique.

Also, remove `createMessage` in favour of calling `messages.create` directly.
2019-02-13 15:24:02 +01:00
JC Brand
0169d86b11 Re-add check for allow_non_roster_messaging 2019-02-13 15:21:41 +01:00
JC Brand
dfe9d301c6 Test that roster groups are fetched before contacts
updates #1405
2019-02-13 11:20:49 +01:00
laszlovl
b172861d2c Dont run fetchRosterContacts async, to prevent processing presence before contacts are created
Fixes #1405
2019-02-13 09:13:45 +01:00
JC Brand
4a5603ab2e More specific selector for markers and another test
Updates #1442
2019-02-13 08:58:27 +01:00
JC Brand
dbcf6002ff Fixes #1442 2019-02-12 19:10:46 +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
7100681496 Use devDependencies consistently
'dependencies' in package.json get installed as well when installing
converse.js or @converse/headless in a 3rd party project, which is
unnecessary.
2019-02-11 19:34:21 +01:00
JC Brand
aa64df35ee converse-core is not a plugin 2019-02-11 14:45:16 +01:00
Johan Oudinet
a7386200f7 Makefile: Simplify sed commands
And fix an extra space added by mistake by the sed command on
_converse.VERSION_NAME in converse-core.js.
2019-02-11 04:45:35 -07:00
JC Brand
abe21dce66 Include origin-id in outgoing messages 2019-02-08 15:34:16 -07:00
laszlovl
590d8769a9 Prevent duplicate messages on MUC join
Fixes #1414
2019-02-08 15:32:21 -07:00
JC Brand
004519931c Upgrade babel and lodash 2019-02-05 13:02:36 -07:00
JC Brand
e1f8d53c46 Initial support for chat markers. Updates #324 2019-02-01 15:05:13 +01:00
JC Brand
4c964c56c0 Filter out undefined 2019-02-01 15:05:13 +01:00
JC Brand
1ca7d34c25 Ignore (and destroy) archived/delayed messages with no body to show 2019-01-31 16:11:17 +01:00
JC Brand
4150a3a70b Add Esperanto as supported language 2019-01-29 05:40:34 +01:00
JC Brand
3cbc99a3f2 Roster fixes related to reconnecting
Avoid `An 'url' property must be specified` error by properly clearing
presence data upon teardown and then resetting the browserStorage upon
reconnection.

Store contact resources in a Backbone collection
2019-01-28 13:30:47 +01:00
JC Brand
4e9e532a06 Use async/await in populateRoster 2019-01-28 13:27:25 +01:00
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