Fix address list for sender key messages.

fork-5.53.8
Greyson Parrelli 2021-10-04 20:50:08 -04:00
rodzic d82b1ec69b
commit 1222d020ad
1 zmienionych plików z 4 dodań i 0 usunięć

Wyświetl plik

@ -1820,6 +1820,10 @@ public class SignalServiceMessageSender {
Set<SignalProtocolAddress> destinations = store.getAllAddressesWithActiveSessions(addressNames);
Map<String, List<Integer>> devicesByAddressName = new HashMap<>();
destinations.addAll(recipients.stream()
.map(a -> new SignalProtocolAddress(a.getIdentifier(), SignalServiceAddress.DEFAULT_DEVICE_ID))
.collect(Collectors.toList()));
for (SignalProtocolAddress destination : destinations) {
List<Integer> devices = devicesByAddressName.containsKey(destination.getName()) ? devicesByAddressName.get(destination.getName()) : new LinkedList<>();
devices.add(destination.getDeviceId());