kopia lustrzana https://github.com/ryukoposting/Signal-Android
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
rodzic
7343613bea
commit
8c6a88374b
|
@ -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;
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue