Kegan Dougal
Kegan Dougal
We should also write a Complement test for this where: - We purposefully reject the event - We then reconcile state later _but don't return the event that was rejected_...
- https://github.com/matrix-org/matrix-js-sdk/blob/develop/src/secret-storage.ts#L183 lists `getSecretStorageKey` as an optional callback. It isn't, and is required to be implemented at the app layer else random bits of code fail.
- `cacheSecretStorageKey` should probably live on `SecretStorageCallbacks` as it is the pair to `getSecretStorageKey` which is in `SecretStorageCallbacks`. Currently the cache function sits in `CryptoCallbacks` which extends `SecretStorageCallbacks`.
Keys won't be backed up for worst case 10 seconds after realising they need to be done. Worse still, this is randomised, causing flakey tests. https://github.com/matrix-org/matrix-js-sdk/blob/49624d5d7308e772ebee84322886a39d2e866869/src/rust-crypto/backup.ts#L319 This should be configurable....
Test written and passing, closing.
Pending complement-crypto test to check that we batch in as large a chunk as possible i.e 250.
This was done.
Synapse will also need https://github.com/element-hq/synapse/pull/16875 in addition to MSC4081 to allow clients to start Olm sessions when the server is down.
Whilst this MSC would definitely help [some situations](https://github.com/element-hq/synapse/issues/17267), we require https://github.com/element-hq/synapse/issues/11374 for fully offline support (so device list updates are eagerly shared too).
When I wrote this MSC originally, I did not think this would be a sufficiently frequent cause of UTDs. However, as we have fixed other UTD causes, this is now...