1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-29 16:43:09 +03:00

Make Crypto.importRoomKeys async

This commit is contained in:
Richard van der Hoff
2017-07-19 13:19:26 +01:00
parent 9ab9b9d75a
commit 14ad32bcd2
2 changed files with 16 additions and 10 deletions

View File

@@ -632,12 +632,15 @@ MatrixClient.prototype.exportRoomKeys = function() {
* Import a list of room keys previously exported by exportRoomKeys
*
* @param {Object[]} keys a list of session export objects
*
* @return {module:client.Promise} a promise which resolves when the keys
* have been imported
*/
MatrixClient.prototype.importRoomKeys = async function(keys) {
MatrixClient.prototype.importRoomKeys = function(keys) {
if (!this._crypto) {
throw new Error("End-to-end encryption disabled");
}
this._crypto.importRoomKeys(keys);
return this._crypto.importRoomKeys(keys);
};
// Room ops