mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-19 16:19:33 +01:00
Remove E164s most places and prefer ServiceId more places.\
This commit is contained in:
committed by
Alex Hart
parent
d6b6884c69
commit
935dd7de45
@@ -22,7 +22,7 @@ import org.thoughtcrime.securesms.service.webrtc.state.WebRtcServiceState;
|
||||
import org.thoughtcrime.securesms.service.webrtc.state.WebRtcServiceStateBuilder;
|
||||
import org.webrtc.VideoTrack;
|
||||
import org.whispersystems.signalservice.api.messages.calls.OfferMessage;
|
||||
import org.whispersystems.signalservice.api.push.ACI;
|
||||
import org.whispersystems.signalservice.api.push.ServiceId;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
@@ -83,7 +83,7 @@ public class GroupActionProcessor extends DeviceAwareActionProcessor {
|
||||
seen.add(Recipient.self());
|
||||
|
||||
for (GroupCall.RemoteDeviceState device : remoteDeviceStates) {
|
||||
Recipient recipient = Recipient.externalPush(ACI.from(device.getUserId()), null, false);
|
||||
Recipient recipient = Recipient.externalPush(ServiceId.from(device.getUserId()), null, false);
|
||||
CallParticipantId callParticipantId = new CallParticipantId(device.getDemuxId(), recipient.getId());
|
||||
CallParticipant callParticipant = participants.get(callParticipantId);
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ import org.signal.ringrtc.CallException;
|
||||
import org.signal.ringrtc.GroupCall;
|
||||
import org.signal.ringrtc.PeekInfo;
|
||||
import org.thoughtcrime.securesms.events.WebRtcViewModel;
|
||||
import org.thoughtcrime.securesms.keyvalue.SignalStore;
|
||||
import org.thoughtcrime.securesms.recipients.Recipient;
|
||||
import org.thoughtcrime.securesms.ringrtc.Camera;
|
||||
import org.thoughtcrime.securesms.ringrtc.RemotePeer;
|
||||
@@ -123,8 +124,8 @@ public class GroupConnectedActionProcessor extends GroupActionProcessor {
|
||||
webRtcInteractor.sendGroupCallMessage(currentState.getCallInfoState().getCallRecipient(), eraId);
|
||||
|
||||
List<UUID> members = new ArrayList<>(peekInfo.getJoinedMembers());
|
||||
if (!members.contains(Recipient.self().requireServiceId().uuid())) {
|
||||
members.add(Recipient.self().requireServiceId().uuid());
|
||||
if (!members.contains(SignalStore.account().requireAci().uuid())) {
|
||||
members.add(SignalStore.account().requireAci().uuid());
|
||||
}
|
||||
webRtcInteractor.updateGroupCallUpdateMessage(currentState.getCallInfoState().getCallRecipient().getId(), eraId, members, WebRtcUtil.isCallFull(peekInfo));
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ import org.thoughtcrime.securesms.service.webrtc.state.WebRtcServiceState;
|
||||
import org.thoughtcrime.securesms.service.webrtc.state.WebRtcServiceStateBuilder;
|
||||
import org.thoughtcrime.securesms.util.NetworkUtil;
|
||||
import org.whispersystems.signalservice.api.messages.calls.OfferMessage;
|
||||
import org.whispersystems.signalservice.api.push.ACI;
|
||||
import org.whispersystems.signalservice.api.push.ServiceId;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -114,7 +114,7 @@ public class GroupPreJoinActionProcessor extends GroupActionProcessor {
|
||||
}
|
||||
|
||||
List<Recipient> callParticipants = Stream.of(peekInfo.getJoinedMembers())
|
||||
.map(uuid -> Recipient.externalPush(ACI.from(uuid), null, false))
|
||||
.map(uuid -> Recipient.externalPush(ServiceId.from(uuid), null, false))
|
||||
.toList();
|
||||
|
||||
WebRtcServiceStateBuilder.CallInfoStateBuilder builder = currentState.builder()
|
||||
|
||||
@@ -26,6 +26,7 @@ import org.thoughtcrime.securesms.util.NetworkUtil;
|
||||
import org.thoughtcrime.securesms.webrtc.locks.LockManager;
|
||||
import org.whispersystems.libsignal.util.guava.Optional;
|
||||
import org.whispersystems.signalservice.api.push.ACI;
|
||||
import org.whispersystems.signalservice.api.push.ServiceId;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
@@ -138,7 +139,7 @@ public final class IncomingGroupCallActionProcessor extends DeviceAwareActionPro
|
||||
.changeCallSetupState(RemotePeer.GROUP_CALL_ID)
|
||||
.isRemoteVideoOffer(true)
|
||||
.ringId(ringId)
|
||||
.ringerRecipient(Recipient.externalPush(ACI.from(uuid), null, false))
|
||||
.ringerRecipient(Recipient.externalPush(ServiceId.from(uuid), null, false))
|
||||
.commit()
|
||||
.changeCallInfoState()
|
||||
.activePeer(new RemotePeer(currentState.getCallInfoState().getCallRecipient().getId(), RemotePeer.GROUP_CALL_ID))
|
||||
|
||||
@@ -65,7 +65,7 @@ import org.whispersystems.signalservice.api.messages.calls.OfferMessage;
|
||||
import org.whispersystems.signalservice.api.messages.calls.OpaqueMessage;
|
||||
import org.whispersystems.signalservice.api.messages.calls.SignalServiceCallMessage;
|
||||
import org.whispersystems.signalservice.api.messages.calls.TurnServerInfo;
|
||||
import org.whispersystems.signalservice.api.push.ACI;
|
||||
import org.whispersystems.signalservice.api.push.ServiceId;
|
||||
import org.whispersystems.signalservice.api.push.exceptions.UnregisteredUserException;
|
||||
|
||||
import java.io.IOException;
|
||||
@@ -154,7 +154,7 @@ public final class SignalCallManager implements CallManager.Observer, GroupCall.
|
||||
serviceExecutor.execute(() -> {
|
||||
if (needsToSetSelfUuid) {
|
||||
try {
|
||||
callManager.setSelfUuid(Recipient.self().requireServiceId().uuid());
|
||||
callManager.setSelfUuid(SignalStore.account().requireAci().uuid());
|
||||
needsToSetSelfUuid = false;
|
||||
} catch (CallException e) {
|
||||
Log.w(TAG, "Unable to set self UUID on CallManager", e);
|
||||
@@ -618,7 +618,7 @@ public final class SignalCallManager implements CallManager.Observer, GroupCall.
|
||||
SignalServiceCallMessage callMessage = SignalServiceCallMessage.forOpaque(opaqueMessage, true, null);
|
||||
|
||||
networkExecutor.execute(() -> {
|
||||
Recipient recipient = Recipient.resolved(RecipientId.from(ACI.from(uuid), null));
|
||||
Recipient recipient = Recipient.resolved(RecipientId.from(ServiceId.from(uuid), null));
|
||||
if (recipient.isBlocked()) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user