You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-28 05:03:59 +03:00
Support for exporting megolm session data
This commit is contained in:
@@ -461,6 +461,21 @@ MatrixClient.prototype.isRoomEncrypted = function(roomId) {
|
||||
return this._crypto.isRoomEncrypted(roomId);
|
||||
};
|
||||
|
||||
/**
|
||||
* Get a list containing all of the room keys
|
||||
*
|
||||
* This should be encrypted before returning it to the user.
|
||||
*
|
||||
* @return {module:client.Promise} a promise which resolves to a list of
|
||||
* session export objects
|
||||
*/
|
||||
MatrixClient.prototype.exportRoomKeys = function() {
|
||||
if (!this._crypto) {
|
||||
return q.reject(new Error("End-to-end encryption disabled"));
|
||||
}
|
||||
return this._crypto.exportRoomKeys();
|
||||
};
|
||||
|
||||
/**
|
||||
* Decrypt a received event according to the algorithm specified in the event.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user