Re-order error handling in GroupSendJob.

fork-5.53.8
Greyson Parrelli 2021-10-15 10:41:40 -04:00
rodzic 00c131355f
commit 85cb41050e
1 zmienionych plików z 4 dodań i 2 usunięć

Wyświetl plik

@ -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);