1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-26 17:03:12 +03:00
Commit Graph

17 Commits

Author SHA1 Message Date
Germain Souquet
5caf05cfa1 Apply new linting rules 2021-05-11 11:25:43 +01:00
David Baker
300b32c8d7 Let's keep starting the timer for the retries straight away
rather than leaving them until next time the queue is sent
2020-04-24 13:16:07 +01:00
David Baker
320811f9ed Don't send key requests until after sync processing is finished
Key requests wait for a short time (500ms) before being sent as
an attempt to wait for the key to arrive before sending a request
for it, but client startup takes way longer than this so this
would still result in key requests being sent for keys that we'd
fetched but were still waiting to be read out of the sync response
and put into the database.
2020-04-24 11:19:52 +01:00
Zoe
c6d32ea2b0 Expose function to force-reset outgoing room key requests 2020-04-02 16:25:50 +01:00
Travis Ralston
d3ce0cb82f Convert src to ES6
The bulk of this is just export/import changes, though there's a couple pieces to highlight:
* We no longer use default exports. This is because it's discouraged by the JS community, though not in any official capacity.
* We now use `polyfillSuper` for some prototype inheritance because the tests, and sometimes webpack, break on "cannot call EncryptionAlgorithm without 'new'". It's very much a workaround, and definitely not needed when we use real classes.

There is some import shuffling to help keep the imports clean - this was done by my IDE.
2019-12-17 15:14:22 -07:00
Michael Telatynski
efcaadd0b4 Rip out more bluebirds 2019-12-02 22:34:46 +00:00
Hubert Chathi
9e29289dcc use a different transaction ID when re-sending a key request 2019-03-06 12:02:48 -05:00
Hubert Chathi
114244f8bb fix typo 2019-03-06 00:23:01 -05:00
Hubert Chathi
5480e8e1d5 refactor key sharing requests
use sendRoomKeyRequest with a new resend flag, instead of cancelRoomKeyRequest,
when requesting keys, so that we make sure that we send a new request if there
is no previous request

fixes https://github.com/vector-im/riot-web/issues/6838
2019-03-04 17:09:56 -05:00
David Baker
d74ed508f9 Restart broken Olm sessions
* Start a new Olm sessions with a device when we get an undecryptable
   message on it.
 * Send a dummy message on that sessions such that the other end knows
   about it.
 * Re-send any outstanding keyshare requests for that device.

Also includes a unit test for megolm that isn't very related but came
out as a result anyway.

Includes https://github.com/matrix-org/matrix-js-sdk/pull/776
Fixes https://github.com/vector-im/riot-web/issues/3822
2018-11-08 19:09:28 +00: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
Luke Barnard
68b230a78f Add function to cancel and resend key request (#624) 2018-03-08 15:01:01 +00:00
Richard van der Hoff
a5d3dd942e q(...) -> Promise.resolve
```
find src spec -name '*.js' |
    xargs perl -i -pe 's/\bq(\([^(]*\))/Promise.resolve$1/'
```
2017-07-12 23:32:28 +01:00
Richard van der Hoff
b96062b6de replace imports of q with bluebird
```
find src spec -name '*.js' |
   xargs perl -i -pe 'if (/require\(.q.\)/) { $_ = "import Promise from '\''bluebird'\'';\n"; }'

find src spec -name '*.js' |
   xargs perl -i -pe 'if (/import q/) { $_ = "import Promise from '\''bluebird'\'';\n"; }'
```
2017-07-12 23:32:28 +01:00
Richard van der Hoff
cd19578d80 Avoid throwing an unhandled error when the indexeddb is deleted
Hopefully this will fix the vector-web test failures (the
OutgoingRoomRequestManager throws an exception because the indexeddb is being
deleted just as it's getting started).
2017-06-20 15:36:05 +01:00
Richard van der Hoff
0371265fea Send a cancellation for room key requests (#456)
* Send a cancellation for room key requests

When we receive a room key, cancel any pending requests we have open for that
key.
2017-06-07 14:00:47 +01:00
Richard van der Hoff
ea2a04135f Send a room key request on decryption failure
When we are missing the keys to decrypt an event, send out a request for those
keys to our other devices and to the original sender.
2017-06-06 14:24:19 +01:00