mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2025-01-22 18:21:39 +01:00
remove previous approach
This commit is contained in:
parent
917ad52302
commit
f74c4e6425
@ -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) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user