mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-25 01:07:47 +00:00
Fix crash.
This commit is contained in:
parent
b74506ea24
commit
a1e98bae75
@ -361,8 +361,11 @@ public class PushGroupSendJob extends PushSendJob implements InjectableType {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Add secondary devices to the list. We shouldn't add our secondary devices
|
// Add secondary devices to the list. We shouldn't add our secondary devices
|
||||||
for (Address member : memberSet) {
|
try {
|
||||||
|
Set<Address> originalMemberSet = new HashSet<>(memberSet);
|
||||||
|
for (Address member : originalMemberSet) {
|
||||||
if (!member.isPhone() || member.serialize().equalsIgnoreCase(localNumber)) { continue; }
|
if (!member.isPhone() || member.serialize().equalsIgnoreCase(localNumber)) { continue; }
|
||||||
|
|
||||||
try {
|
try {
|
||||||
List<String> secondaryDevices = PromiseUtil.timeout(LokiStorageAPI.shared.getSecondaryDevicePublicKeys(member.serialize()), 5000).get();
|
List<String> secondaryDevices = PromiseUtil.timeout(LokiStorageAPI.shared.getSecondaryDevicePublicKeys(member.serialize()), 5000).get();
|
||||||
memberSet.addAll(Stream.of(secondaryDevices).map(string -> {
|
memberSet.addAll(Stream.of(secondaryDevices).map(string -> {
|
||||||
@ -373,6 +376,9 @@ public class PushGroupSendJob extends PushSendJob implements InjectableType {
|
|||||||
// Timed out, go to the next member
|
// Timed out, go to the next member
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
Log.e("PushGroupSend", "Error occurred while adding secondary devices: " + e);
|
||||||
|
}
|
||||||
|
|
||||||
return new LinkedList<>(memberSet);
|
return new LinkedList<>(memberSet);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user