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.
fork-5.53.8
Greyson Parrelli 2021-05-18 12:13:11 -04:00
rodzic 7343613bea
commit 8c6a88374b
2 zmienionych plików z 1 dodań i 11 usunięć

Wyświetl plik

@ -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);
}
}

Wyświetl plik

@ -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;
}