Require that message bundles include all linked devices

This commit is contained in:
Jon Chambers
2024-06-24 16:35:19 -04:00
committed by Jon Chambers
parent cb5cd64c05
commit 90e622b307
8 changed files with 89 additions and 60 deletions

View File

@@ -96,12 +96,6 @@ 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);