mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 09:20:19 +01:00
Enforce expected ordering when scheduling text and media messages.
This commit is contained in:
committed by
Nicholas Tinsley
parent
d33aa247db
commit
56a44ae65c
@@ -394,11 +394,11 @@ public class MessageSender {
|
||||
if (isLocalSelfSend(context, recipient, SendType.SIGNAL)) {
|
||||
sendLocalMediaSelf(context, messageId);
|
||||
} else if (recipient.isPushGroup()) {
|
||||
jobManager.add(new PushGroupSendJob(messageId, recipient.getId(), Collections.emptySet(), true), messageDependsOnIds, recipient.getId().toQueueKey());
|
||||
jobManager.add(new PushGroupSendJob(messageId, recipient.getId(), Collections.emptySet(), true, false), messageDependsOnIds, recipient.getId().toQueueKey());
|
||||
} else if (recipient.isDistributionList()) {
|
||||
jobManager.add(new PushDistributionListSendJob(messageId, recipient.getId(), true, Collections.emptySet()), messageDependsOnIds, recipient.getId().toQueueKey());
|
||||
} else {
|
||||
jobManager.add(IndividualSendJob.create(messageId, recipient, true), messageDependsOnIds, recipient.getId().toQueueKey());
|
||||
jobManager.add(IndividualSendJob.create(messageId, recipient, true, false), messageDependsOnIds, recipient.getId().toQueueKey());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -540,10 +540,10 @@ public class MessageSender {
|
||||
JobManager jobManager = ApplicationDependencies.getJobManager();
|
||||
|
||||
if (uploadJobIds.size() > 0) {
|
||||
Job mediaSend = IndividualSendJob.create(messageId, recipient, true);
|
||||
Job mediaSend = IndividualSendJob.create(messageId, recipient, true, false);
|
||||
jobManager.add(mediaSend, uploadJobIds);
|
||||
} else {
|
||||
IndividualSendJob.enqueue(context, jobManager, messageId, recipient);
|
||||
IndividualSendJob.enqueue(context, jobManager, messageId, recipient, false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -551,10 +551,10 @@ public class MessageSender {
|
||||
JobManager jobManager = ApplicationDependencies.getJobManager();
|
||||
|
||||
if (uploadJobIds.size() > 0) {
|
||||
Job groupSend = new PushGroupSendJob(messageId, recipient.getId(), filterRecipientIds, !uploadJobIds.isEmpty());
|
||||
Job groupSend = new PushGroupSendJob(messageId, recipient.getId(), filterRecipientIds, !uploadJobIds.isEmpty(), false);
|
||||
jobManager.add(groupSend, uploadJobIds, uploadJobIds.isEmpty() ? null : recipient.getId().toQueueKey());
|
||||
} else {
|
||||
PushGroupSendJob.enqueue(context, jobManager, messageId, recipient.getId(), filterRecipientIds);
|
||||
PushGroupSendJob.enqueue(context, jobManager, messageId, recipient.getId(), filterRecipientIds, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user