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

Send out megolm keys when we start a megolm session

For now, pending the arrival of SPEC-138, this happens via inline messages in
the room.
This commit is contained in:
Richard van der Hoff
2016-08-22 17:09:24 +01:00
parent e4bfb3ca32
commit 238700cbdb
4 changed files with 86 additions and 15 deletions

View File

@@ -50,12 +50,14 @@ module.exports.DECRYPTION_CLASSES = {};
* @param {string} params.deviceId The identifier for this device.
* @param {module:crypto} params.crypto crypto core
* @param {module:OlmDevice} params.olmDevice olm.js wrapper
* @param {module:base-apis~MatrixBaseApis} baseApis base matrix api interface
* @param {string} params.roomId The ID of the room we will be sending to
*/
var EncryptionAlgorithm = function(params) {
this._deviceId = params.deviceId;
this._crypto = params.crypto;
this._olmDevice = params.olmDevice;
this._baseApis = params.baseApis;
this._roomId = params.roomId;
};
/** */
@@ -81,7 +83,7 @@ EncryptionAlgorithm.prototype.initRoomEncryption = function(roomMembers) {
* @method module:crypto-algorithms/base.EncryptionAlgorithm#encryptMessage
* @abstract
*
* @param {module:models/room?} room
* @param {module:models/room} room
* @param {string} eventType
* @param {object} plaintext event content
*