Check outbox

This commit is contained in:
M66B 2020-03-25 08:19:29 +01:00
parent 6d3fac14b2
commit e8d3dbf96e
1 changed files with 5 additions and 1 deletions

View File

@ -3904,9 +3904,13 @@ public class FragmentCompose extends FragmentBase {
// Delete draft (cannot move to outbox)
EntityOperation.queue(context, draft, EntityOperation.DELETE);
EntityFolder outbox = db.folder().getOutbox();
if (outbox == null)
throw new IllegalArgumentException("Outbox missing");
// Copy message to outbox
draft.id = null;
draft.folder = db.folder().getOutbox().id;
draft.folder = outbox.id;
draft.uid = null;
draft.fts = false;
draft.ui_hide = false;