mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-24 19:56:00 +00:00
Do not add dependencies on previous message sends if you have no media.
This was an accidental carry-over from the PushMediaSendJob -> IndividualSendJob rename. Previously, PushMediaSendJob basically always had media, so this check wasn't needed. Now it rarely has media, so we have to add it.
This commit is contained in:
committed by
Alex Hart
parent
e0be9b4ef5
commit
3231f8302c
@@ -106,9 +106,14 @@ public class IndividualSendJob extends PushSendJob {
|
||||
ApplicationDependencies.getScheduledMessageManager().scheduleIfNecessary();
|
||||
return;
|
||||
}
|
||||
Set<String> attachmentUploadIds = enqueueCompressingAndUploadAttachmentsChains(jobManager, message);
|
||||
|
||||
jobManager.add(IndividualSendJob.create(messageId, recipient, attachmentUploadIds.size() > 0, isScheduledSend), attachmentUploadIds, isScheduledSend ? null : recipient.getId().toQueueKey());
|
||||
Set<String> attachmentUploadIds = enqueueCompressingAndUploadAttachmentsChains(jobManager, message);
|
||||
boolean hasMedia = attachmentUploadIds.size() > 0;
|
||||
boolean addHardDependencies = hasMedia && !isScheduledSend;
|
||||
|
||||
jobManager.add(IndividualSendJob.create(messageId, recipient, hasMedia, isScheduledSend),
|
||||
attachmentUploadIds,
|
||||
addHardDependencies ? recipient.getId().toQueueKey() : null);
|
||||
} catch (NoSuchMessageException | MmsException e) {
|
||||
Log.w(TAG, "Failed to enqueue message.", e);
|
||||
SignalDatabase.messages().markAsSentFailed(messageId);
|
||||
|
||||
@@ -136,7 +136,12 @@ public final class PushGroupSendJob extends PushSendJob {
|
||||
throw new MmsException("Inactive group!");
|
||||
}
|
||||
|
||||
jobManager.add(new PushGroupSendJob(messageId, destination, filterAddresses, !attachmentUploadIds.isEmpty(), isScheduledSend), attachmentUploadIds, attachmentUploadIds.isEmpty() || isScheduledSend ? null : destination.toQueueKey());
|
||||
boolean hasMedia = attachmentUploadIds.size() > 0;
|
||||
boolean addHardDependencies = hasMedia && !isScheduledSend;
|
||||
|
||||
jobManager.add(new PushGroupSendJob(messageId, destination, filterAddresses, hasMedia, isScheduledSend),
|
||||
attachmentUploadIds,
|
||||
addHardDependencies ? destination.toQueueKey() : null);
|
||||
|
||||
} catch (NoSuchMessageException | MmsException e) {
|
||||
Log.w(TAG, "Failed to enqueue message.", e);
|
||||
|
||||
Reference in New Issue
Block a user