Commit Graph

732 Commits

Author SHA1 Message Date
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
5406e9739c Trying to fix timing issue on Travis 2018-08-25 01:04:17 +02:00
JC Brand
9e240c5647 Increase timeouts to try and avoid timing issues on Travis 2018-08-25 00:43:05 +02:00
JC Brand
fd639e2da6 Remove the active flag for devices.
Instead of setting `active` to `false`, we remove the device entirely
(unless its the current device).

Doing it this way means more fetching of bundles for devices that
disappear and then reappear from a user's devicelist.

However, there might be caching invalidation concerns with just reusing
a cached bundle for a device id that disappeared and then reappears.

Additionally this change simplifies the showing of a contact's device
fingerprints in the modal, since we don't have to take active/inactive
into consideration.

updates #497
2018-08-23 14:02:43 +02:00
JC Brand
5e9d6c3d6a Merge branch 'master' into converse-omemo 2018-08-23 09:45:13 +02:00
JC Brand
9f8d30dde3 Create a new store, _converse.config to store trusted
The `_converse.session` store gets cleared after logout, but we want the
`trusted` flag to persist after logout.

Also update the documentation no that the `storage` config option has
been removed in favor of `trusted`.
2018-08-23 09:41:39 +02:00
JC Brand
62cecbec5f Merge branch 'master' into converse-omemo 2018-08-22 23:41:36 +02:00
JC Brand
9ed2ad631a Store whether this is a trusted device in _converse.session
So that it persists across page loads. Otherwise storage falls back to
the default, causing records to be in both local- and sessionStorage.

Additionally, update singleton models to have the 'id' available as a getter.

Otherwise multiple records gets stored in browserStorage, causing random
results being returned.
2018-08-22 23:36:54 +02:00
JC Brand
fa0e7aeff5 Updated so that own device is properly created and published
Based on live testing. Updated tests accordingly.
2018-08-22 18:16:36 +02:00
JC Brand
3ec426e11d Don't render OMEMO stuff in profile modal if OMEMO's not enabled 2018-08-21 18:03:34 +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
9a7f56db7d Fix format of stanza that queries for devices. 2018-08-19 10:09:43 +02:00
JC Brand
4ed43854bd Bugfix. Items need to go inside the list 2018-08-18 18:25:52 +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
41a42fe2f7 Test for mentions with spaces in them.
Also remove Converse from fullscreen background
2018-08-16 16:02:09 +02:00
JC Brand
2db3db9bab Add support for editing messages containing mentions 2018-08-16 15:17:54 +02:00
JC Brand
d9c5867ff2 Check references when incrementing unread messages counter 2018-08-16 15:17:54 +02:00
JC Brand
b7eb19e225 Render mentions in a message 2018-08-16 15:17:54 +02:00
JC Brand
15df9b8605 Inlcude references in the outgoing XMPP stanza 2018-08-16 15:17:54 +02:00
JC Brand
f2b017ec89 Add method to determine references from message text 2018-08-16 15:17:53 +02:00
JC Brand
e10d9b074e Rearrange: move non-nested tests to top of describe 2018-08-16 15:17:53 +02:00
JC Brand
324ffd5e40 Let @ trigger autocomplete with all possible options shown 2018-08-16 15:17:53 +02:00
JC Brand
cc3a158b57 Initial work on showing all options on @ 2018-08-16 15:17:53 +02:00
JC Brand
13c9612a8a Let an additional tab select the currently highlighted element 2018-08-16 15:17:53 +02:00
JC Brand
2abd1c1db1 Get selection via up/down arrow to work 2018-08-16 15:17:53 +02:00
JC Brand
86fab99c54 Expand test case and improve code. 2018-08-16 15:17:53 +02:00
JC Brand
2a593a03b7 Add a test spec for autocompletion 2018-08-16 15:17:53 +02:00
JC Brand
33cd23c529 Minor idiomatic changes 2018-08-16 15:17:53 +02:00
JC Brand
c25cc4c76b Bugfix. Existing occupants weren't found because query was only by jid
Which meant that occupants were being duplicated.

updates #1146
2018-08-09 15:46:49 +02:00
JC Brand
2d05487862 More code reuse between chatboxview and chatroomview 2018-08-07 15:32:13 +02:00
JC Brand
27bc33ba09 Use nickname from global settings when entering a room 2018-08-07 10:09:35 +02:00
JC Brand
2884549bb3 Test decryption of incoming OMEMO message
updates #497
2018-08-04 23:49:01 +02:00
JC Brand
713f49453f Working example of AES-GCM encryption and decryption
with key import and export.

updates #497
2018-08-04 21:32:08 +02:00
JC Brand
f2c283c907 More work on decrypting messages 2018-08-04 19:41:06 +02:00
JC Brand
be0eaecff9 Parse incoming OMEMO encrypted messages 2018-08-04 09:26:23 +02:00
JC Brand
b273d00412 Fix failing tests due to api refactor (returning promises) 2018-08-04 08:39:14 +02:00
JC Brand
d99c48b868 Fix failing test.
Modal query not specific enough when there are multiple modals
2018-08-04 08:34:13 +02:00
JC Brand
4c3645c559 Merge branch 'master' into converse-omemo 2018-08-03 14:47:20 +02:00
JC Brand
890dbca8b8 Fix tests failing on Travis 2018-08-02 08:30:37 +02:00
JC Brand
f120fbd209 Bugfix. Own groupchat messages weren't being recognized 2018-08-01 18:37:54 +02:00
JC Brand
506aa33131 Wait for promises before opening chats in API methods 2018-08-01 11:12:00 +02:00
JC Brand
1443fdd447 (WIP) Wait for promises before opening chats in API methods 2018-08-01 11:10:43 +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
e774e9d1af Test that own devices (from other clients) get included
when sending out encrypted messages.

updates #497
2018-07-28 16:36:56 +02:00
JC Brand
a3593dbc7d Implement and test sending of encrypted messages
updates #497
2018-07-28 15:37:36 +02:00
JC Brand
f40e4b4dbb Merge branch 'master' into converse-omemo 2018-07-25 12:06:42 +02:00
JC Brand
4cefc7cdf9 Fix failing tests due to renames 2018-07-25 12:05:09 +02:00
JC Brand
bcd6845756 Show fingerprints in the user details modal
updates #497
2018-07-25 11:33:16 +02:00
JC Brand
114e46dfab Fix broken test and refactor slightly. updates #497 2018-07-22 10:33:57 +02:00