Allow moving POP3 drafts

pull/178/head
M66B 5 years ago
parent 4aeeda6d59
commit 3edad14a5f

@ -956,15 +956,17 @@ class Core {
boolean seen = jargs.optBoolean(1); boolean seen = jargs.optBoolean(1);
boolean unflag = jargs.optBoolean(3); boolean unflag = jargs.optBoolean(3);
// Move from trash only
if (!EntityFolder.TRASH.equals(folder.type))
throw new IllegalArgumentException("Invalid POP3 folder type=" + folder.type);
// Get target folder // Get target folder
EntityFolder target = db.folder().getFolder(id); EntityFolder target = db.folder().getFolder(id);
if (target == null) if (target == null)
throw new FolderNotFoundException(); throw new FolderNotFoundException();
// Move from trash/drafts only
if (!EntityFolder.TRASH.equals(folder.type) &&
!EntityFolder.DRAFTS.equals(folder.type))
throw new IllegalArgumentException("Invalid POP3 folder" +
" source=" + folder.type + " target=" + target.type);
message.folder = target.id; message.folder = target.id;
if (seen) if (seen)
message.ui_seen = seen; message.ui_seen = seen;

Loading…
Cancel
Save