pull/209/head
M66B 2 years ago
parent 086b9e7971
commit 079803e0bf

@ -1187,23 +1187,25 @@ class Core {
if (!message.content) if (!message.content)
throw new IllegalArgumentException("Message body missing"); throw new IllegalArgumentException("Message body missing");
List<EntityAttachment> attachments = db.attachment().getAttachments(message.id); if (!BuildConfig.DEBUG) {
for (EntityAttachment attachment : attachments) List<EntityAttachment> attachments = db.attachment().getAttachments(message.id);
if (EntityAttachment.SMIME_SIGNATURE.equals(attachment.encryption)) for (EntityAttachment attachment : attachments)
for (EntityAttachment content : attachments) if (EntityAttachment.SMIME_SIGNATURE.equals(attachment.encryption))
if (EntityAttachment.SMIME_CONTENT.equals(content.encryption)) { for (EntityAttachment content : attachments)
boolean afile = attachment.getFile(context).exists(); if (EntityAttachment.SMIME_CONTENT.equals(content.encryption)) {
boolean cfile = content.getFile(context).exists(); boolean afile = attachment.getFile(context).exists();
if (!attachment.available || !afile || !content.available || !cfile) { boolean cfile = content.getFile(context).exists();
Log.e("S/MIME vanished" + if (!attachment.available || !afile || !content.available || !cfile) {
" available=" + attachment.available + "/" + content.available + Log.e("S/MIME vanished" +
" file=" + afile + "/" + cfile); " available=" + attachment.available + "/" + content.available +
db.attachment().setAvailable(attachment.id, false); " file=" + afile + "/" + cfile);
db.attachment().setAvailable(content.id, false); db.attachment().setAvailable(attachment.id, false);
db.attachment().setEncryption(attachment.id, null); db.attachment().setAvailable(content.id, false);
db.attachment().setEncryption(content.id, null); db.attachment().setEncryption(attachment.id, null);
db.attachment().setEncryption(content.id, null);
}
} }
} }
imessage = MessageHelper.from(context, message, null, isession, false); imessage = MessageHelper.from(context, message, null, isession, false);

Loading…
Cancel
Save