Better types for WebAPI

This commit is contained in:
Fedor Indutny 2021-09-21 17:58:03 -07:00 committed by GitHub
commit b9d6497cb1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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,
};