mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-01 05:29:20 +03:00
Some Sieve parser improvements
This commit is contained in:
parent
61c2eefec1
commit
4022d39f76
7 changed files with 32 additions and 18 deletions
|
|
@ -48,6 +48,7 @@ import { NotifyCommand, ValidNotifyMethodTest, NotifyMethodCapabilityTest } from
|
|||
import { IHaveTest, ErrorCommand } from 'Sieve/Extensions/rfc5463';
|
||||
import { MailboxExistsTest, MetadataTest, MetadataExistsTest } from 'Sieve/Extensions/rfc5490';
|
||||
import { ForEveryPartCommand, BreakCommand, ReplaceCommand, EncloseCommand, ExtractTextCommand } from 'Sieve/Extensions/rfc5703';
|
||||
import { ValidExtListTest } from 'Sieve/Extensions/rfc6134';
|
||||
import { IncludeCommand, ReturnCommand, GlobalCommand } from 'Sieve/Extensions/rfc6609';
|
||||
|
||||
export const
|
||||
|
|
@ -127,6 +128,8 @@ export const
|
|||
ReplaceCommand,
|
||||
EncloseCommand,
|
||||
ExtractTextCommand,
|
||||
// rfc6134
|
||||
ValidExtListTest,
|
||||
// rfc6609
|
||||
IncludeCommand,
|
||||
ReturnCommand,
|
||||
|
|
@ -144,6 +147,17 @@ export const
|
|||
return commands;
|
||||
},
|
||||
|
||||
unavailableCommands = () => {
|
||||
let commands = {};
|
||||
AllCommands.forEach(cmd => {
|
||||
const obj = new cmd, requires = obj.require;
|
||||
if (requires && !(Array.isArray(requires) ? requires : [requires]).every(string => capa.includes(string))) {
|
||||
commands[obj.identifier] = cmd;
|
||||
}
|
||||
});
|
||||
return commands;
|
||||
},
|
||||
|
||||
availableActions = () => {
|
||||
let actions = {}, id;
|
||||
AllCommands.forEach(cmd => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue