Move getAlwaysRelayCalls to window.Events

This commit is contained in:
Fedor Indutny 2021-08-19 11:41:24 -07:00 committed by GitHub
parent 4b810d5c3e
commit 1cc7c5dc2d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 3 deletions

View file

@ -1823,7 +1823,7 @@ export class CallingClass {
const iceServerJson = await window.textsecure.messaging.server.getIceServers(); const iceServerJson = await window.textsecure.messaging.server.getIceServers();
const shouldRelayCalls = Boolean(await window.getAlwaysRelayCalls()); const shouldRelayCalls = window.Events.getAlwaysRelayCalls();
// If the peer is 'unknown', i.e. not in the contact list, force IP hiding. // If the peer is 'unknown', i.e. not in the contact list, force IP hiding.
const isContactUnknown = !conversation.isFromOrAddedByTrustedContact(); const isContactUnknown = !conversation.isFromOrAddedByTrustedContact();

2
ts/window.d.ts vendored
View file

@ -202,10 +202,8 @@ declare global {
enterKeyboardMode: () => void; enterKeyboardMode: () => void;
enterMouseMode: () => void; enterMouseMode: () => void;
getAccountManager: () => AccountManager; getAccountManager: () => AccountManager;
getAlwaysRelayCalls: () => Promise<boolean>;
getBuiltInImages: () => Promise<Array<string>>; getBuiltInImages: () => Promise<Array<string>>;
getConversations: () => ConversationModelCollectionType; getConversations: () => ConversationModelCollectionType;
getCountMutedConversations: () => Promise<boolean>;
getEnvironment: typeof getEnvironment; getEnvironment: typeof getEnvironment;
getExpiration: () => string; getExpiration: () => string;
getGuid: () => string; getGuid: () => string;