You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-29 16:43:09 +03:00
Merge pull request #179 from matrix-org/rav/send_megolm_keys
Send out megolm keys when we start a megolm session
This commit is contained in:
@@ -540,6 +540,7 @@ Crypto.prototype.setRoomEncryption = function(roomId, config, roomMembers) {
|
||||
deviceId: this._deviceId,
|
||||
crypto: this,
|
||||
olmDevice: this._olmDevice,
|
||||
baseApis: this._baseApis,
|
||||
roomId: roomId,
|
||||
});
|
||||
this._roomAlgorithms[roomId] = alg;
|
||||
@@ -678,6 +679,10 @@ Crypto.prototype.encryptEventIfNeeded = function(event, room) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!room) {
|
||||
throw new Error("Cannot send encrypted messages in unknown rooms");
|
||||
}
|
||||
|
||||
var roomId = event.getRoomId();
|
||||
|
||||
var alg = this._roomAlgorithms[roomId];
|
||||
|
||||
Reference in New Issue
Block a user