Show body size

This commit is contained in:
M66B
2019-09-30 21:00:28 +02:00
parent b3f34ec0c9
commit 23df3a100a
9 changed files with 1930 additions and 16 deletions

View File

@@ -419,6 +419,13 @@ public class ServiceSend extends ServiceBase {
HtmlHelper.getPreview(body),
parts.getWarnings(message.warning));
Long total = null;
List<EntityAttachment> attachments = db.attachment().getAttachments(sid);
for (EntityAttachment attachment : attachments)
if (attachment.size != null)
total = (total == null ? 0 : total) + attachment.size;
db.message().setMessageSize(sid, (long) body.length(), total);
db.message().setMessageSent(sid, time);
db.message().setMessageUiHide(sid, false);