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
expose prepareToEncrypt in the client API
This commit is contained in:
@@ -767,8 +767,6 @@ MegolmEncryption.prototype._notifyBlockedDevices = async function(
|
||||
* @param {module:models/room} room the room the event is in
|
||||
*/
|
||||
MegolmEncryption.prototype.prepareToEncrypt = function(room) {
|
||||
logger.debug(`Preparing to encrypt events for ${this._roomId}`);
|
||||
|
||||
if (this.encryptionPreparation) {
|
||||
// We're already preparing something, so don't do anything else.
|
||||
// FIXME: check if we need to restart
|
||||
@@ -776,6 +774,8 @@ MegolmEncryption.prototype.prepareToEncrypt = function(room) {
|
||||
return;
|
||||
}
|
||||
|
||||
logger.debug(`Preparing to encrypt events for ${this._roomId}`);
|
||||
|
||||
this.encryptionPreparation = (async () => {
|
||||
const [devicesInRoom, blocked] = await this._getDevicesInRoom(room);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user