Commit Graph

109 Commits

Author SHA1 Message Date
JC Brand
45ed506551 Don't hardcode devices storage to session storage.
The devicelists are not stored in session storage, so we end up with
fetching all the devices per stored devicelist with every new browser
session.
2018-12-21 06:29:22 +01:00
JC Brand
e6c66cfebd Ability to republish if publish-options precondition not met 2018-12-21 06:29:22 +01:00
JC Brand
bcb3bcaf03 OMEMO can only be supported once it's been initialized
updates #1180
2018-12-21 06:29:21 +01:00
JC Brand
a3830e9a7a Use async/await 2018-12-21 06:29:21 +01:00
JC Brand
be1be3534c Don't render the lock icon when the MUC doesn't qualify
Updates #1180
2018-12-21 06:29:21 +01:00
JC Brand
9aca32ad97 Handle errors when sending encrypted groupchat messages
updates #1180
2018-12-21 06:29:21 +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
85dab7367b Use pubsub#access_model to publish keys and devices publically 2018-12-21 04:35:28 +01:00
JC Brand
9c05ca9a09 Add test for sending/receiving MUC OMEMO messages
While adding support for MUCs, I refactored converse-omemo somewhat to move functions
out of `overrides` and to use async/await

Updates #1180
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
c8d78d744b Fix typo and formatting in user-facing strings 2018-12-19 05:50:06 +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
79bfb45639 Use async/await in MAM code and tests 2018-12-06 13:10:33 +01:00
JC Brand
cd63afcaad Add space following question mark 2018-11-22 09:09:14 +01:00
Christoph Scholz
da5ca0b585 implement XEP-0184: Message Delivery Receipts 2018-11-13 17:13:35 +01:00
JC Brand
3b60ced39c Add a button for regenerating your OMEMO device bundle 2018-11-12 20:29:55 +01:00
JC Brand
fa4c555c44 Use async/await instead of explicit Promise 2018-11-12 14:45:57 +01:00
JC Brand
affafc746c Bugfix. Make sure _devices_promise is a Promise 2018-11-12 12:04:25 +01:00
JC Brand
461ebc0aea Use async/await instead of explicit promises 2018-11-09 17:37:14 +01:00
JC Brand
6904f9a897 Use es2015 modules instead of UMD 2018-10-23 12:25:58 +02:00
cmrd Senya
8ba8eb02fa Update main converse.js package to use @converse/headless
* Update moved dependencies references to @converse/headless
* Remove unused webpack resolve aliases
2018-10-22 12:44:38 +02:00
JC Brand
c8dc7b63b2 Disable OMEMO when the current device is not trusted.
updates #1242
2018-10-18 07:47:25 +02:00
JC Brand
bb78d8519f Use async function instead of explicit promises 2018-10-18 07:03:42 +02:00
JC Brand
029fb6d60b Make sure we have a device to publish before doing so 2018-10-18 00:17:21 +02:00
JC Brand
94a1852b4f Use async function instead of explicit promises 2018-10-17 23:58:11 +02:00
JC Brand
a5a600bade Fixes #1193 Properly handle OMEMO messages without body tag 2018-10-15 23:47:22 +02:00
JC Brand
79b8ed7177 New release 4.0.2 2018-10-02 22:51:01 +02:00
JC Brand
dbfd460125 Don't include additionalData when en/decrypting with crypto.subtle
Otherwise compatibility with Conversations is broken.
Unfortunately this means that OMEMO won't work on Edge, because it
for some reason requires the additionalData.

References:
* https://github.com/conversejs/converse.js/issues/1187#issuecomment-426276243
* https://stackoverflow.com/questions/42933162/web-crypto-api-using-microsoft-edge-38-14393-0-0/42950731

Fixes #1187
2018-10-02 22:07:16 +02:00
JC Brand
e05b7e9de3 OMEMO fixes for Edge. 2018-09-25 13:21:48 +02:00
JC Brand
cfcab80147 Don't inform of unencryptable OMEMO messages unless in debug mode 2018-09-07 15:23:16 +02:00
JC Brand
5f16babebd Fix failing OMEMO test and simplify by using async/await 2018-09-02 14:27:05 +02:00
JC Brand
6f13676ee1 Show OMEMO error messages only in debug mode 2018-08-31 21:33:46 +02:00
JC Brand
1d5cf8eb7c Fix AES-GCM encryption/decryption so that it works with Conversations
Fixes #497
2018-08-31 21:13:33 +02:00
JC Brand
c2184ce8e1 Always create a new session 2018-08-31 18:44:24 +02:00
JC Brand
fc6982ce08 Merge branch 'omemo-debug' 2018-08-31 18:39:01 +02:00
JC Brand
bd1fd7eef1 Key should be AES-128, not AES-256 2018-08-31 18:33:03 +02:00
JC Brand
c2f1b2543f Pass array buffer to libsignal decrypt 2018-08-31 18:24:08 +02:00
JC Brand
c8211085fd Pass array buffer to libsignal encrypt/decrypt methods 2018-08-31 18:10:09 +02:00
JC Brand
6a061b4525 Use raw key format and not jwk. Set correct key size. 2018-08-31 17:15:03 +02:00
JC Brand
ed9afe9afb Only include key and not whole payload from libsignal 2018-08-31 13:57:49 +02:00
JC Brand
34541d6410 Add check before resetting 2018-08-30 13:39:33 +02:00
JC Brand
1dc1c1f98a Properly generate and render fingerprints 2018-08-27 21:02:31 +02:00
JC Brand
3e7c8655ad Add a <store> hint to OMEMO messages.
updates #497
2018-08-27 16:44:19 +02:00
JC Brand
15a4bcd11e Add method to generate missing prekeys
When receiving a PreKeySignalMessage, then a prekey has been chosen and
should now be removed from the list of available prekeys in the bundle,
so that a different device doesn't choose it as well.

AFAICT, libsignal removes the prekey, so it's then up to us to
regenerate it and republish our bundle.

updates #497
2018-08-27 16:43:58 +02:00
JC Brand
ea5144c7e5 Refactor the OMEMOStore to not duplicate prekeys
Before these changes, prekeys were stored in two places, one place that
converse-omemo accessed and one that libsignal accessed and when
libsignal deleted a prekey the other store wasn't updated.

Now we let the methods called by libsignal store/remove prekeys (and the
signed_prekey) in the same place as used by the code in converse-omemo.
2018-08-25 23:22:18 +02:00
JC Brand
7959855891 Move publishBundle to OMEMOStore
updates #497
2018-08-24 16:32:40 +02:00
JC Brand
d784e4a73a Show an icon to indicate that a message is encrypted
updates #497
2018-08-24 16:26:54 +02:00
JC Brand
3eb5e93f81 Finally able to send a message and decrypt it on the other side
Updates #497
2018-08-24 14:40:48 +02:00
JC Brand
2dd5976f65 Fix bugs in the OMEMO store and in the decrypt method.
Updates #497
2018-08-24 13:17:32 +02:00
JC Brand
9e56858aae Remove unnecessary promise wrapper 2018-08-24 10:51:59 +02:00