Use system contact attributes when starting call
Co-authored-by: Jamie Kyle <113370520+jamiebuilds-signal@users.noreply.github.com> Co-authored-by: Scott Nonnenberg <scott@signal.org>
This commit is contained in:
@@ -127,6 +127,7 @@ import {
|
|||||||
} from '../util/callDisposition';
|
} from '../util/callDisposition';
|
||||||
import { isNormalNumber } from '../util/isNormalNumber';
|
import { isNormalNumber } from '../util/isNormalNumber';
|
||||||
import { LocalCallEvent } from '../types/CallDisposition';
|
import { LocalCallEvent } from '../types/CallDisposition';
|
||||||
|
import { isInSystemContacts } from '../util/isInSystemContacts';
|
||||||
|
|
||||||
const {
|
const {
|
||||||
processGroupCallRingCancellation,
|
processGroupCallRingCancellation,
|
||||||
@@ -2291,15 +2292,15 @@ export class CallingClass {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the peer is 'unknown', i.e. not in the contact list, force IP hiding.
|
// If the peer is not in the user's system contacts, force IP hiding.
|
||||||
const isContactUnknown = !conversation.isFromOrAddedByTrustedContact();
|
const isContactUntrusted = !isInSystemContacts(conversation.attributes);
|
||||||
|
|
||||||
const callSettings = {
|
const callSettings = {
|
||||||
iceServer: {
|
iceServer: {
|
||||||
...iceServer,
|
...iceServer,
|
||||||
urls: iceServer.urls.slice(),
|
urls: iceServer.urls.slice(),
|
||||||
},
|
},
|
||||||
hideIp: shouldRelayCalls || isContactUnknown,
|
hideIp: shouldRelayCalls || isContactUntrusted,
|
||||||
dataMode: DataMode.Normal,
|
dataMode: DataMode.Normal,
|
||||||
// TODO: DESKTOP-3101
|
// TODO: DESKTOP-3101
|
||||||
// audioLevelsIntervalMillis: AUDIO_LEVEL_INTERVAL_MS,
|
// audioLevelsIntervalMillis: AUDIO_LEVEL_INTERVAL_MS,
|
||||||
|
Reference in New Issue
Block a user