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
Check if we need to upload new one-time keys every 10 minutes
This commit is contained in:
@@ -2497,6 +2497,11 @@ MatrixClient.prototype.startClient = function(opts) {
|
|||||||
|
|
||||||
if (this._crypto) {
|
if (this._crypto) {
|
||||||
this._crypto.uploadKeys(5).done();
|
this._crypto.uploadKeys(5).done();
|
||||||
|
var tenMinutes = 1000 * 60 * 10;
|
||||||
|
var self = this;
|
||||||
|
this._uploadIntervalID = global.setInterval(function() {
|
||||||
|
self._crypto.uploadKeys(5).done();
|
||||||
|
}, tenMinutes);
|
||||||
}
|
}
|
||||||
|
|
||||||
// periodically poll for turn servers if we support voip
|
// periodically poll for turn servers if we support voip
|
||||||
@@ -2522,6 +2527,9 @@ MatrixClient.prototype.stopClient = function() {
|
|||||||
this._syncApi.stop();
|
this._syncApi.stop();
|
||||||
this._syncApi = null;
|
this._syncApi = null;
|
||||||
}
|
}
|
||||||
|
if (this._crypto) {
|
||||||
|
global.clearInterval(this._uploadIntervalID)
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
function setupCallEventHandler(client) {
|
function setupCallEventHandler(client) {
|
||||||
|
|||||||
Reference in New Issue
Block a user