mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-22 01:40:13 +01:00
Assume that PNI registration IDs are always present on Device records
This commit is contained in:
committed by
Jon Chambers
parent
93ba6616d1
commit
13fc0ffbca
@@ -321,7 +321,7 @@ public class MessageSender {
|
||||
|
||||
final int expectedRegistrationId = switch (serviceIdentifier.identityType()) {
|
||||
case ACI -> device.getRegistrationId();
|
||||
case PNI -> device.getPhoneNumberIdentityRegistrationId().orElseGet(device::getRegistrationId);
|
||||
case PNI -> device.getPhoneNumberIdentityRegistrationId();
|
||||
};
|
||||
|
||||
return registrationId != expectedRegistrationId;
|
||||
|
||||
@@ -63,7 +63,7 @@ public class ReceiptSender {
|
||||
final Map<Byte, Integer> registrationIdsByDeviceId = destinationAccount.getDevices().stream()
|
||||
.collect(Collectors.toMap(Device::getId, device -> switch (destinationIdentifier.identityType()) {
|
||||
case ACI -> device.getRegistrationId();
|
||||
case PNI -> device.getPhoneNumberIdentityRegistrationId().orElseGet(device::getRegistrationId);
|
||||
case PNI -> device.getPhoneNumberIdentityRegistrationId();
|
||||
}));
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user