mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-24 13:08:46 +00:00
No longer use SignalServiceAddress legacy identifier.
We had to do this in the past because we previously didn't allow UUID-only contacts back in the day. This hasn't been the case for some time. We should be preferring the UUID in all cases.
This commit is contained in:
@@ -234,7 +234,7 @@ public class SignalServiceCipher {
|
||||
} else if (e164Address != null && store.containsSession(e164Address)) {
|
||||
return e164Address;
|
||||
} else {
|
||||
return new SignalProtocolAddress(address.getLegacyIdentifier(), sourceDevice);
|
||||
return new SignalProtocolAddress(address.getIdentifier(), sourceDevice);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -69,16 +69,6 @@ public class SignalServiceAddress {
|
||||
}
|
||||
}
|
||||
|
||||
public String getLegacyIdentifier() {
|
||||
if (e164.isPresent()) {
|
||||
return e164.get();
|
||||
} else if (uuid.isPresent()) {
|
||||
return uuid.get().toString();
|
||||
} else {
|
||||
throw new AssertionError("Given the checks in the constructor, this should not be possible.");
|
||||
}
|
||||
}
|
||||
|
||||
public Optional<String> getRelay() {
|
||||
return relay;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user