[ https://issues.apache.org/jira/browse/JAMES-3450?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17234414#comment-17234414 ]
Lan Khuat commented on JAMES-3450: ---------------------------------- Descriptions added. > Email/query reject Filter object with both FilterOperator and FilterCondition > ----------------------------------------------------------------------------- > > Key: JAMES-3450 > URL: https://issues.apache.org/jira/browse/JAMES-3450 > Project: James Server > Issue Type: Sub-task > Reporter: Lan Khuat > Priority: Major > > According to JMAP spec: [https://jmap.io/spec-core.html#changes] section 5.5, > a filter object in Email/query can either be an array of FilterOperator or > FilterCondition. > Currently we are allowing the request to have properties from both types. > This could lead to unexpected result when querying Email. For example: > > {code:java} > { > "using": [ > "urn:ietf:params:jmap:core", > "urn:ietf:params:jmap:mail"], > "methodCalls": [[ > "Email/query", { > "accountId": > "29883977c13473ae7cb7678ef767cbfbaffc8a44a6e463d971d23a65c1dc4af6", > "filter": { > "inMailbox": "1", > "operator": "AND", > "conditions": [ > { "hasKeyword": "custom" }, { "hasKeyword": "another_custom" } > ] > } > }, "c1"] > ] > } > {code} > Email/query will ignore the _*inMailbox*_ condition in the request above. > *DoD* > Integration tests to show that Email/query only accept an array of > FilterOperator or FilterCondition in their respective correct structure. -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org