From f16827d9eceba6680ed38ae03632a9d8932c9854 Mon Sep 17 00:00:00 2001 From: Jim Gustafson Date: Thu, 21 Nov 2024 12:41:07 -0800 Subject: [PATCH] Force relays only if remote user is not a 'Signal Connection'. --- .../securesms/service/webrtc/IncomingCallActionProcessor.java | 2 +- .../securesms/service/webrtc/OutgoingCallActionProcessor.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/service/webrtc/IncomingCallActionProcessor.java b/app/src/main/java/org/thoughtcrime/securesms/service/webrtc/IncomingCallActionProcessor.java index 7ab9100ea6..4491faf7e4 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/service/webrtc/IncomingCallActionProcessor.java +++ b/app/src/main/java/org/thoughtcrime/securesms/service/webrtc/IncomingCallActionProcessor.java @@ -94,7 +94,7 @@ public class IncomingCallActionProcessor extends DeviceAwareActionProcessor { return currentState; } - boolean hideIp = !activePeer.getRecipient().isSystemContact() || callSetupState.isAlwaysTurnServers(); + boolean hideIp = !activePeer.getRecipient().isProfileSharing() || callSetupState.isAlwaysTurnServers(); VideoState videoState = currentState.getVideoState(); CallParticipant callParticipant = Objects.requireNonNull(currentState.getCallInfoState().getRemoteCallParticipant(activePeer.getRecipient())); diff --git a/app/src/main/java/org/thoughtcrime/securesms/service/webrtc/OutgoingCallActionProcessor.java b/app/src/main/java/org/thoughtcrime/securesms/service/webrtc/OutgoingCallActionProcessor.java index 4d85bdf70d..1f30e0fbae 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/service/webrtc/OutgoingCallActionProcessor.java +++ b/app/src/main/java/org/thoughtcrime/securesms/service/webrtc/OutgoingCallActionProcessor.java @@ -144,6 +144,7 @@ public class OutgoingCallActionProcessor extends DeviceAwareActionProcessor { return currentState; } + boolean hideIp = !activePeer.getRecipient().isProfileSharing() || callSetupState.isAlwaysTurnServers(); VideoState videoState = currentState.getVideoState(); CallParticipant callParticipant = Objects.requireNonNull(currentState.getCallInfoState().getRemoteCallParticipant(activePeer.getRecipient())); @@ -157,7 +158,7 @@ public class OutgoingCallActionProcessor extends DeviceAwareActionProcessor { callParticipant.getVideoSink(), videoState.requireCamera(), callSetupState.getIceServers(), - callSetupState.isAlwaysTurnServers(), + hideIp, NetworkUtil.getCallingDataMode(context), AUDIO_LEVELS_INTERVAL, currentState.getCallSetupState(activePeer).isEnableVideoOnCreate());