From 85cb41050e25f71b81062f236c972b456f473757 Mon Sep 17 00:00:00 2001 From: Greyson Parrelli Date: Fri, 15 Oct 2021 10:41:40 -0400 Subject: [PATCH] Re-order error handling in GroupSendJob. --- .../org/thoughtcrime/securesms/jobs/PushGroupSendJob.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/jobs/PushGroupSendJob.java b/app/src/main/java/org/thoughtcrime/securesms/jobs/PushGroupSendJob.java index 2263f57ee..247d97fb6 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/jobs/PushGroupSendJob.java +++ b/app/src/main/java/org/thoughtcrime/securesms/jobs/PushGroupSendJob.java @@ -232,9 +232,8 @@ public final class PushGroupSendJob extends PushSendJob { if (message.isViewOnce()) { DatabaseFactory.getAttachmentDatabase(context).deleteAttachmentFilesForViewOnceMessage(messageId); } - } else if (!networkFailures.isEmpty()) { - throw new RetryLaterException(); } else if (!identityMismatches.isEmpty()) { + Log.w(TAG, "Failing because there were " + identityMismatches.size() + " identity mismatches."); database.markAsSentFailed(messageId); notifyMediaMessageDeliveryFailed(context, messageId); @@ -243,6 +242,9 @@ public final class PushGroupSendJob extends PushSendJob { .collect(Collectors.toSet()); RetrieveProfileJob.enqueue(mismatchRecipientIds); + } else if (!networkFailures.isEmpty()) { + Log.w(TAG, "Retrying because there were " + networkFailures.size() + " network failures."); + throw new RetryLaterException(); } } catch (UntrustedIdentityException | UndeliverableMessageException e) { warn(TAG, String.valueOf(message.getSentTimeMillis()), e);