|
@@ -185,6 +185,19 @@ export class OlmAdapter extends Listenable {
|
185
|
185
|
return this._keyIndex;
|
186
|
186
|
}
|
187
|
187
|
|
|
188
|
+ /**
|
|
189
|
+ * Frees the olmData session for the given participant.
|
|
190
|
+ *
|
|
191
|
+ */
|
|
192
|
+ clearParticipantSession(participant) {
|
|
193
|
+ const olmData = this._getParticipantOlmData(participant);
|
|
194
|
+
|
|
195
|
+ if (olmData.session) {
|
|
196
|
+ olmData.session.free();
|
|
197
|
+ olmData.session = undefined;
|
|
198
|
+ }
|
|
199
|
+ }
|
|
200
|
+
|
188
|
201
|
/**
|
189
|
202
|
* Internal helper to bootstrap the olm library.
|
190
|
203
|
*
|
|
@@ -440,12 +453,7 @@ export class OlmAdapter extends Listenable {
|
440
|
453
|
_onParticipantLeft(id, participant) {
|
441
|
454
|
logger.debug(`Participant ${id} left`);
|
442
|
455
|
|
443
|
|
- const olmData = this._getParticipantOlmData(participant);
|
444
|
|
-
|
445
|
|
- if (olmData.session) {
|
446
|
|
- olmData.session.free();
|
447
|
|
- olmData.session = undefined;
|
448
|
|
- }
|
|
456
|
+ this.clearParticipantSession(participant);
|
449
|
457
|
}
|
450
|
458
|
|
451
|
459
|
/**
|