remove previous approach

This commit is contained in:
Bruno Windels 2022-09-26 15:26:16 +02:00
parent 917ad52302
commit f74c4e6425

View File

@ -513,7 +513,6 @@ export class Session {
// TODO: what can we do if this throws? // TODO: what can we do if this throws?
await txn.complete(); await txn.complete();
} }
await this._updateTurnServers();
// enable session backup, this requests the latest backup version // enable session backup, this requests the latest backup version
if (!this._keyBackup.get()) { if (!this._keyBackup.get()) {
if (dehydratedDevice) { if (dehydratedDevice) {
@ -560,18 +559,6 @@ export class Session {
} }
} }
async _updateTurnServers() {
const turnServerData = await this._hsApi.getTurnServer().response();
this._callHandler.setTurnServers([{
urls: turnServerData.uris,
username: turnServerData.username,
credential: turnServerData.password,
}]);
if (turnServerData.ttl > 0) {
setTimeout(this._updateTurnServers, turnServerData.ttl * 1000);
}
}
async _getPendingEventsByRoom(txn) { async _getPendingEventsByRoom(txn) {
const pendingEvents = await txn.pendingEvents.getAll(); const pendingEvents = await txn.pendingEvents.getAll();
return pendingEvents.reduce((groups, pe) => { return pendingEvents.reduce((groups, pe) => {