mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-22 00:38:02 +01:00
Allow, but do not require, message delivery to devices without active delivery channels
This commit is contained in:
@@ -89,7 +89,6 @@ public class DestinationDeviceValidator {
|
||||
final Set<Byte> excludedDeviceIds) throws MismatchedDevicesException {
|
||||
|
||||
final Set<Byte> accountDeviceIds = account.getDevices().stream()
|
||||
.filter(Device::hasMessageDeliveryChannel)
|
||||
.map(Device::getId)
|
||||
.filter(deviceId -> !excludedDeviceIds.contains(deviceId))
|
||||
.collect(Collectors.toSet());
|
||||
@@ -97,6 +96,12 @@ public class DestinationDeviceValidator {
|
||||
final Set<Byte> missingDeviceIds = new HashSet<>(accountDeviceIds);
|
||||
missingDeviceIds.removeAll(messageDeviceIds);
|
||||
|
||||
// Temporarily "excuse" missing devices if they're missing a message delivery channel as a transitional measure
|
||||
missingDeviceIds.removeAll(account.getDevices().stream()
|
||||
.filter(device -> !device.hasMessageDeliveryChannel())
|
||||
.map(Device::getId)
|
||||
.collect(Collectors.toSet()));
|
||||
|
||||
final Set<Byte> extraDeviceIds = new HashSet<>(messageDeviceIds);
|
||||
extraDeviceIds.removeAll(accountDeviceIds);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user