mirror of
https://github.com/M66B/FairEmail.git
synced 2026-05-08 00:26:50 +02:00
Added attachments to templates
This commit is contained in:
@@ -1159,10 +1159,12 @@ public class EntityRule {
|
||||
reply.id = db.message().insertMessage(reply);
|
||||
|
||||
String body;
|
||||
EntityAnswer.Data answerData = null;
|
||||
if (resend)
|
||||
body = Helper.readText(message.getFile(context));
|
||||
else {
|
||||
body = answer.getHtml(context, message.from);
|
||||
answerData = answer.getData(context, message.from);
|
||||
body = answerData.getHtml();
|
||||
|
||||
if (original_text) {
|
||||
Document msg = JsoupEx.parse(body);
|
||||
@@ -1219,6 +1221,9 @@ public class EntityRule {
|
||||
db.attachment().setDownloaded(attachment.id, target.length());
|
||||
}
|
||||
|
||||
if (answerData != null)
|
||||
answerData.insertAttachments(context, reply.id);
|
||||
|
||||
EntityOperation.queue(context, reply, EntityOperation.SEND);
|
||||
|
||||
// Batch send operations, wait until after commit
|
||||
|
||||
Reference in New Issue
Block a user