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

Let event decryption be asynchronous

Once everything moves to indexeddb, it's going to require callbacks and the
like, so let's make the decrypt API asynchronous in preparation.
This commit is contained in:
Richard van der Hoff
2017-07-07 14:16:35 +01:00
parent 86f2c86440
commit 8bbf14acbf
7 changed files with 122 additions and 51 deletions

View File

@@ -113,13 +113,10 @@ class DecryptionAlgorithm {
* @method module:crypto/algorithms/base.DecryptionAlgorithm#decryptEvent
* @abstract
*
* @param {object} event raw event
* @param {MatrixEvent} event undecrypted event
*
* @return {null} if the event referred to an unknown megolm session
* @return {module:crypto.DecryptionResult} decryption result
*
* @throws {module:crypto/algorithms/base.DecryptionError} if there is a
* problem decrypting the event
* @return {Promise} resolves once we have finished decrypting. Rejects with an
* `algorithms.DecryptionError` if there is a problem decrypting the event.
*/
/**