Better types for WebAPI

This commit is contained in:
Fedor Indutny
2021-09-21 17:58:03 -07:00
committed by GitHub
parent c05d23e628
commit b9d6497cb1
22 changed files with 156 additions and 107 deletions

View File

@@ -1902,7 +1902,7 @@ export class CallingClass {
throw new Error('getCallSettings: offline!');
}
const iceServerJson = await window.textsecure.messaging.server.getIceServers();
const iceServer = await window.textsecure.messaging.server.getIceServers();
const shouldRelayCalls = window.Events.getAlwaysRelayCalls();
@@ -1910,7 +1910,7 @@ export class CallingClass {
const isContactUnknown = !conversation.isFromOrAddedByTrustedContact();
return {
iceServer: JSON.parse(iceServerJson),
iceServer,
hideIp: shouldRelayCalls || isContactUnknown,
bandwidthMode: BandwidthMode.Normal,
};