1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-25 05:23:13 +03:00
Commit Graph

72 Commits

Author SHA1 Message Date
Michael Telatynski
3a1de9fbdc Rip out more bluebirds AGAIN 2019-12-02 22:34:46 +00:00
Michael Telatynski
6bba5ca25a Rip out some more bluebird 2019-12-02 22:34:46 +00:00
Michael Telatynski
bab4582139 Replace more Bluebirdy stuffs 2019-12-02 22:34:46 +00:00
Michael Telatynski
549b0f9313 Stop using Bluebird.delay and Bluebird promise::delay
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-11-21 10:05:59 +00:00
David Baker
686a7a40f9 Remove outdated comment
uhoreg says this is fine now...
2019-11-14 12:11:07 +00:00
David Baker
2a7b2835b6 remove unused function 2019-11-14 12:11:07 +00:00
David Baker
e92d2bd70a Fix test again
That one was part of the protocol - don't camelcase that
2019-10-28 16:07:26 +00:00
David Baker
de1b545df1 lint 2019-10-28 15:42:42 +00:00
Hubert Chathi
4c6fa89053 various cross-signing fixes and improvements 2019-06-12 11:47:12 -04:00
Hubert Chathi
941d871daf fix check for empty cross-signing repsonse 2019-05-29 16:59:51 -04:00
Hubert Chathi
53804cac5c save cross-signing keys from sync and verify new keys for user 2019-05-28 22:28:54 -04:00
Hubert Chathi
ec2f07e1aa add methods for signing and checking users and devices with cross-signing 2019-05-03 18:05:36 -04:00
Hubert Chathi
32814d1833 Merge branch 'develop' into dbkr/cross_signing 2019-04-03 19:28:51 -04:00
J. Ryan Stinnett
5a26503da7 Remove sessionStore to cryptoStore migration path
The code to migrate from the `sessionStore` to `cryptoStore` originally appeared
in https://github.com/matrix-org/matrix-js-sdk/pull/584 (2017-12-06). At this
point, it seems safe to assume most sessions that need migrating have already
done so. Removing this code simplifies store handling and removes the
`sessionStore` from most places in JS SDK.
2019-03-20 16:56:47 +00:00
Hubert Chathi
d2557bc943 only set the dirty flag if something was actually changed 2019-02-22 08:37:34 -05:00
David Baker
7f5584e4f5 All the linting 2019-02-05 13:03:27 +00:00
David Baker
7dedcb82b2 Lint
or at least the rules that are consistent with the rest of our
codebase
2019-02-01 18:12:27 +00:00
David Baker
1d58a64ee1 Track SSKs for users
and verify our own against our locally stored private part
2019-02-01 13:04:21 +00:00
David Baker
5c5ce0dfe3 Typo 2018-10-31 18:32:48 +00:00
David Baker
6de213483c Change getDeviceByIdentityKey() to just the 2 arg version 2018-10-31 18:31:56 +00:00
David Baker
f5846b89ea More modern loop syntax 2018-10-31 18:18:41 +00:00
David Baker
2814932845 lint 2018-10-30 12:36:03 +00:00
David Baker
a2430dbc53 Fix DeviceList index of users by identity key
Was causing all keys to be send as unverified
2018-10-30 12:29:44 +00:00
David Baker
243bab7036 Merge branch 'dbkr/stop_devicelist' into dbkr/e2e_backups 2018-10-25 19:03:57 +01:00
David Baker
88b39f4b67 Stop devicelist when client is stopped
To avoid the devicelist trying to save after the client has been
stopped

Hopefully will fix random test failures on node 11.
2018-10-25 19:00:03 +01:00
David Baker
5e8061f846 Merge remote-tracking branch 'origin/develop' into dbkr/e2e_backups 2018-10-25 17:33:48 +01:00
André Jaenisch
f41060c39a Replace console.log with loglevel logger. Fixes #332
Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2018-10-24 00:48:57 +02:00
Hubert Chathi
434ac86090 properly fill out the is_verified and first_message_index fields 2018-10-19 10:51:19 -04:00
David Baker
5a23927e56 Move comment up 2018-03-09 10:09:36 +00:00
David Baker
facfcf679d DeviceList: bring save forward if necessary
If save is called with a delay that would want the save to happen
sooner then the save we currently have scheduled, cancel the
current save and schedule a new one for the sooner time.
2018-03-08 15:35:35 +00:00
David Baker
4f17352858 Don't do /keys/changes on incremental sync
Remove the call to /keys/changes when we do an incremental syn
where the old sync token doesn't match the one in the device list
store. To allow us to do this, always save the device list store
before saving the sync data, so we can safely assume the device
list store is at least as fresh as the sync token in the sync store.

Thread save functions through to allow this, add a delay parameter
so the sync can save the device list immediately and skip the wait,
and add a wantsSave() method so the sync can skip saving the device
list if the sync store isn't going to save anyway.

Fixes https://github.com/vector-im/riot-web/issues/6068
2018-03-08 12:33:08 +00:00
David Baker
66e2b3bb70 Don't mark devicelist dirty unnecessarily
This was marking the device list as dirty even when nothing had
actually changed, causing unnecessary saves.
2018-03-07 17:32:51 +00:00
David Baker
c3bede58aa Fux lying comment 2018-01-29 13:35:03 +01:00
David Baker
470bd23b3b Add new devices as we get them 2018-01-25 16:49:30 +01:00
David Baker
8c2645c5dd Comment typo 2018-01-24 21:39:46 +01:00
David Baker
4fbf4f1069 Hopefully address PR feedback 2018-01-22 17:08:19 +01:00
David Baker
074cfb7c58 Add more comments 2018-01-18 17:32:47 +00:00
David Baker
8b649cec8d All the copyrights 2018-01-18 11:52:27 +00:00
David Baker
461acbcc81 More test fixing
* Change test for new storage layer
 * Always store device keys we download, even if we weren't
   tracking the user.
2018-01-17 18:49:33 +00:00
David Baker
5bab8647b6 Fix device tracking with initial /sync
* Check whether we share an e2e room with user IDs in the 'left'
   field of /keys/changes: there's no guarantee we no longer share
   any e2e rooms with these users
 * Reset everyone's tracking status on an initial sync - just
   re-fetching device lists for all users we're currently tracking
   isn't good enough since room memberships may have changed.
 * Fix typo in test
2018-01-17 16:03:46 +00:00
David Baker
0174c5674f Make tests pass, finally.
Mostly making tests aware of new storage format or making them
force it to be written. Also some bugfixes like we didn't json
encode some things in the localstorage store and we didn't
correctly check the promise when requesting device data saves.
2018-01-16 17:57:49 +00:00
David Baker
27d28b8247 More test fixing
Allow localstorage store to take a localstorage impl, make TestClient
pass a cryptostore & fix True/true typo
2018-01-15 16:27:28 +00:00
David Baker
110f43a246 Make DeviceList test pass
Includes making saveIfDirty() return a promise in case you care
about when changes got saved (which the test does).
2018-01-15 15:21:39 +00:00
David Baker
36d7d33afc Null fix & lint
Don't end up with devices / device tracking status being null
2018-01-12 16:44:51 +00:00
David Baker
6c1087e429 Migrate from session store 2018-01-12 14:41:08 +00:00
David Baker
2cdb010cff Fix lint 2018-01-12 14:17:10 +00:00
David Baker
29d44f809e delay saving so we can batch multiple operations 2018-01-12 12:01:00 +00:00
David Baker
83e4aa2755 Initial attempt at device tracking -> indexeddb
* Message sending works again, but

 * Marking multiple devices known (ie. 'send anyway') is very slow
   because it writes all device info out each time
 * Support for non-indexedb stores not written yet
 * No migration
2018-01-11 18:10:19 +00:00
Richard van der Hoff
3140c6526a Fix typo which resulted in stuck key download requests
(... and hence stuck outgoing e2e messages)

Fixes https://github.com/vector-im/riot-web/issues/4278
2017-09-29 10:02:16 +01:00
Richard van der Hoff
1a55f550c0 Handle 'left' users in the deviceList mananagement
When we no longer share any rooms with a given user, the server will stop
sending us updates on their device list, and will (once synapse is updated)
send us a notification of that fact via the 'left' field in the device_lists
field in /sync, or the response from /keys/changes.
2017-09-08 15:40:26 +01:00