fix queuing of pending parts that had data already

fixes #4061
Closes #4073
// FREEBIE
This commit is contained in:
Jake McGinty
2015-09-10 16:48:10 -10:00
committed by Moxie Marlinspike
parent ed1d411bde
commit 0e06e2de97
6 changed files with 18 additions and 10 deletions

View File

@@ -71,6 +71,10 @@ public class AttachmentDownloadJob extends MasterSecretJob implements Injectable
Log.w(TAG, "part no longer exists.");
return;
}
if (part.getDataUri() != null) {
Log.w(TAG, "part was already downloaded.");
return;
}
Log.w(TAG, "Downloading push part " + partId);

View File

@@ -87,6 +87,7 @@ public class PushGroupSendJob extends PushSendJob implements InjectableType {
database.markAsPush(messageId);
database.markAsSecure(messageId);
database.markAsSent(messageId, "push".getBytes(), 0);
markPartsUploaded(messageId, message.getBody());
} catch (InvalidNumberException | RecipientFormattingException | UndeliverableMessageException e) {
Log.w(TAG, e);
database.markAsSentFailed(messageId);