mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
hookup megolm decryption in session
This commit is contained in:
parent
32a399afec
commit
baad4bd37f
@ -49,6 +49,9 @@ export class Session {
|
||||
this._e2eeAccount = null;
|
||||
this._deviceTracker = null;
|
||||
this._olmEncryption = null;
|
||||
this._megolmEncryption = null;
|
||||
this._megolmDecryption = null;
|
||||
|
||||
if (olm) {
|
||||
this._olmUtil = new olm.Utility();
|
||||
this._deviceTracker = new DeviceTracker({
|
||||
@ -92,9 +95,12 @@ export class Session {
|
||||
storage: this._storage,
|
||||
now: this._clock.now,
|
||||
ownDeviceId: this._sessionInfo.deviceId,
|
||||
})
|
||||
const megolmDecryption = new MegOlmDecryption({pickleKey: PICKLE_KEY, olm: this._olm});
|
||||
this._deviceMessageHandler.enableEncryption({olmDecryption, megolmDecryption});
|
||||
});
|
||||
this._megolmDecryption = new MegOlmDecryption({
|
||||
pickleKey: PICKLE_KEY,
|
||||
olm: this._olm,
|
||||
});
|
||||
this._deviceMessageHandler.enableEncryption({olmDecryption, megolmDecryption: this._megolmDecryption});
|
||||
}
|
||||
|
||||
_createRoomEncryption(room, encryptionParams) {
|
||||
@ -118,6 +124,7 @@ export class Session {
|
||||
deviceTracker: this._deviceTracker,
|
||||
olmEncryption: this._olmEncryption,
|
||||
megolmEncryption: this._megolmEncryption,
|
||||
megolmDecryption: this._megolmDecryption,
|
||||
encryptionParams
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user