Use encrypted message part as message size

This commit is contained in:
M66B 2020-04-12 09:24:24 +02:00
parent d287de8563
commit e991634ef5
1 changed files with 11 additions and 0 deletions

View File

@ -1424,6 +1424,17 @@ public class MessageHelper {
else
size += (long) s;
}
for (EntityAttachment attachment : getAttachments())
if (attachment.size != null &&
(EntityAttachment.PGP_MESSAGE.equals(attachment.encryption) ||
EntityAttachment.SMIME_MESSAGE.equals(attachment.encryption) ||
EntityAttachment.SMIME_SIGNED_DATA.equals(attachment.encryption)))
if (size == null)
size = attachment.size;
else
size += attachment.size;
return size;
}