mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-31 22:26:06 +02:00
Refactoring
This commit is contained in:
@@ -352,10 +352,11 @@ public class EntityRule {
|
||||
if (identity == null)
|
||||
throw new IllegalArgumentException("Rule identity not found");
|
||||
|
||||
String body = EntityAnswer.getAnswerText(context, aid, message.from);
|
||||
if (body == null)
|
||||
EntityAnswer answer = db.answer().getAnswer(aid);
|
||||
if (answer == null)
|
||||
throw new IllegalArgumentException("Rule answer not found");
|
||||
|
||||
|
||||
EntityMessage reply = new EntityMessage();
|
||||
reply.account = message.account;
|
||||
reply.folder = db.folder().getOutbox().id;
|
||||
@@ -376,6 +377,8 @@ public class EntityRule {
|
||||
reply.avatar = (lookupUri == null ? null : lookupUri.toString());
|
||||
|
||||
reply.id = db.message().insertMessage(reply);
|
||||
|
||||
String body = answer.getText(message.from);
|
||||
Helper.writeText(reply.getFile(context), body);
|
||||
db.message().setMessageContent(reply.id,
|
||||
true,
|
||||
|
||||
Reference in New Issue
Block a user