Skip to content

Conversation

somdoron
Copy link

within search OR operation only allow one search key while the protocol allow multiple.
To solve this I added special operator called AND which is allow only within OR clause, the AND just allow unbound array which is inline into the OR operation.

Some examples, if I want to the following IMAP query I cannot do that before this PR:

OR (UNKEWORD DISCARD) (BEFORE 24-AUG-2016 UNSEEN)

trying to do the following yield error:
[['OR', [['UNKEYWORD', 'DISCARD'], [['BEFORE', '24-AUG-2016'], UNSEEN]]]

Now I can do:
[['OR', [['UNKEYWORD', 'DISCARD'], [['AND', ['BEFORE', '24-AUG-2016'], UNSEEN]]]]

which works

If you have another solution for the problem that will be great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant