- static Set<SignalServiceAddress> getSignalServiceAddresses(Collection<String> recipients, String localNumber) {
- Set<SignalServiceAddress> recipientsTS = new HashSet<>(recipients.size());
- for (String recipient : recipients) {
- try {
- recipientsTS.add(getPushAddress(recipient, localNumber));
- } catch (InvalidNumberException e) {
- System.err.println("Failed to add recipient \"" + recipient + "\": " + e.getMessage());
- System.err.println("Aborting sending.");
- return null;
- }
- }
- return recipientsTS;
- }
-