FIX account mail filtering move to folder folders are hardcoded
This commit is contained in:
+2
-2
@@ -294,8 +294,8 @@ function normalizeAccount(input) {
|
||||
if ((action === 'move' || action === 'label') && !value) {
|
||||
throw new Error(`Mail rule ${index + 1} needs a destination folder or label.`);
|
||||
}
|
||||
if (action === 'move' && !['Inbox', 'Archive', 'Trash'].includes(value)) {
|
||||
throw new Error(`Mail rule ${index + 1} must move messages to Inbox, Archive, or Trash.`);
|
||||
if (action === 'move' && !['Inbox', 'Archive', 'Trash'].includes(value) && !value.startsWith(CUSTOM_FOLDER_PREFIX)) {
|
||||
throw new Error(`Mail rule ${index + 1} must move messages to Inbox, Archive, Trash, or one of your folders.`);
|
||||
}
|
||||
return { id: String(rule.id || randomUUID()), senderContains, subjectContains, action, value };
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user