You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by bt...@apache.org on 2021/04/09 12:00:42 UTC

[james-project] branch master updated (6a6c3fe -> f5192ea)

This is an automated email from the ASF dual-hosted git repository.

btellier pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git.


    from 6a6c3fe  JAMES-3520 MDN/parse should position forEmailId property (#365)
     new 7c8179d  JAMES-3417 JMAP Email/query sort support for size, subject, from, to
     new e52eacf  JAMES-3417 JMAP Email/query: advertise size, subject, from, to support
     new f5192ea  JAMES-3417 JMAP Documentation: Email/query supports size, subject, from, to sorts

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../rfc8621/contract/CustomMethodContract.scala    |   4 +-
 .../contract/EmailQueryMethodContract.scala        | 278 ++++++++++++++++++++-
 .../rfc8621/contract/SessionRoutesContract.scala   |   4 +-
 .../doc/specs/spec/mail/message.mdown              |   4 -
 .../org/apache/james/jmap/core/Capabilities.scala  |   2 +-
 .../org/apache/james/jmap/mail/EmailQuery.scala    |  10 +-
 .../james/jmap/routes/SessionRoutesTest.scala      |   4 +-
 7 files changed, 285 insertions(+), 21 deletions(-)

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org


[james-project] 01/03: JAMES-3417 JMAP Email/query sort support for size, subject, from, to

Posted by bt...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

btellier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit 7c8179d847956faccbf8489a36b59b75ca1330d0
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Mon Apr 5 21:11:00 2021 +0700

    JAMES-3417 JMAP Email/query sort support for size, subject, from, to
---
 .../contract/EmailQueryMethodContract.scala        | 278 ++++++++++++++++++++-
 .../org/apache/james/jmap/mail/EmailQuery.scala    |  10 +-
 2 files changed, 278 insertions(+), 10 deletions(-)

diff --git a/server/protocols/jmap-rfc-8621-integration-tests/jmap-rfc-8621-integration-tests-common/src/main/scala/org/apache/james/jmap/rfc8621/contract/EmailQueryMethodContract.scala b/server/protocols/jmap-rfc-8621-integration-tests/jmap-rfc-8621-integration-tests-common/src/main/scala/org/apache/james/jmap/rfc8621/contract/EmailQueryMethodContract.scala
index 2bc6e24..24942d5 100644
--- a/server/protocols/jmap-rfc-8621-integration-tests/jmap-rfc-8621-integration-tests-common/src/main/scala/org/apache/james/jmap/rfc8621/contract/EmailQueryMethodContract.scala
+++ b/server/protocols/jmap-rfc-8621-integration-tests/jmap-rfc-8621-integration-tests-common/src/main/scala/org/apache/james/jmap/rfc8621/contract/EmailQueryMethodContract.scala
@@ -1860,6 +1860,280 @@ trait EmailQueryMethodContract {
   }
 
   @Test
+  def listMailsShouldBeSortedWhenUsingSize(server: GuiceJamesServer): Unit = {
+    server.getProbe(classOf[MailboxProbeImpl]).createMailbox(MailboxPath.inbox(BOB))
+    val otherMailboxPath = MailboxPath.forUser(BOB, "other")
+    server.getProbe(classOf[MailboxProbeImpl]).createMailbox(otherMailboxPath)
+
+    val message1: Message = Message.Builder
+      .of
+      .setSubject("test")
+      .setBody("short", StandardCharsets.UTF_8)
+      .build
+    val messageId1: MessageId = server.getProbe(classOf[MailboxProbeImpl])
+      .appendMessage(BOB.asString, MailboxPath.inbox(BOB),
+        AppendCommand.builder().build(message1))
+      .getMessageId
+
+    val message2: Message = Message.Builder
+      .of
+      .setSubject("test")
+      .setBody("definitly looooooooooooooooooooooooooooooooooooong", StandardCharsets.UTF_8)
+      .build
+    val messageId2 = server.getProbe(classOf[MailboxProbeImpl])
+      .appendMessage(BOB.asString, MailboxPath.inbox(BOB),
+        AppendCommand.builder().build(message2))
+      .getMessageId
+
+    val message3: Message = Message.Builder
+      .of
+      .setSubject("test")
+      .setBody("not that short", StandardCharsets.UTF_8)
+      .build
+    val messageId3 = server.getProbe(classOf[MailboxProbeImpl])
+      .appendMessage(BOB.asString, MailboxPath.inbox(BOB),
+        AppendCommand.builder().build(message3))
+      .getMessageId
+
+    val request =
+      s"""{
+         |  "using": ["urn:ietf:params:jmap:core", "urn:ietf:params:jmap:mail"],
+         |  "methodCalls": [[
+         |    "Email/query",
+         |    {
+         |      "accountId": "29883977c13473ae7cb7678ef767cbfbaffc8a44a6e463d971d23a65c1dc4af6",
+         |      "sort": [{"property":"size"}]
+         |    },
+         |    "c1"]]
+         |}""".stripMargin
+
+    awaitAtMostTenSeconds.untilAsserted { () =>
+      val response = `given`
+        .header(ACCEPT.toString, ACCEPT_RFC8621_VERSION_HEADER)
+        .body(request)
+      .when
+        .post
+      .`then`
+        .statusCode(SC_OK)
+        .contentType(JSON)
+        .extract
+        .body
+        .asString
+
+    assertThatJson(response)
+      .inPath("$.methodResponses[0][1].ids")
+      .isEqualTo(s"""["${messageId1.serialize}", "${messageId3.serialize}", "${messageId2.serialize}"]""")
+    }
+  }
+
+  @Test
+  def listMailsShouldBeSortedWhenUsingSubject(server: GuiceJamesServer): Unit = {
+    server.getProbe(classOf[MailboxProbeImpl]).createMailbox(MailboxPath.inbox(BOB))
+    val otherMailboxPath = MailboxPath.forUser(BOB, "other")
+    server.getProbe(classOf[MailboxProbeImpl]).createMailbox(otherMailboxPath)
+
+    val message1: Message = Message.Builder
+      .of
+      .setSubject("aba")
+      .setBody("any body", StandardCharsets.UTF_8)
+      .build
+    val messageId1: MessageId = server.getProbe(classOf[MailboxProbeImpl])
+      .appendMessage(BOB.asString, MailboxPath.inbox(BOB),
+        AppendCommand.builder().build(message1))
+      .getMessageId
+
+    val message2: Message = Message.Builder
+      .of
+      .setSubject("aaa")
+      .setBody("any body", StandardCharsets.UTF_8)
+      .build
+    val messageId2 = server.getProbe(classOf[MailboxProbeImpl])
+      .appendMessage(BOB.asString, MailboxPath.inbox(BOB),
+        AppendCommand.builder().build(message2))
+      .getMessageId
+
+    val message3: Message = Message.Builder
+      .of
+      .setSubject("ccc")
+      .setBody("any body", StandardCharsets.UTF_8)
+      .build
+    val messageId3 = server.getProbe(classOf[MailboxProbeImpl])
+      .appendMessage(BOB.asString, MailboxPath.inbox(BOB),
+        AppendCommand.builder().build(message3))
+      .getMessageId
+
+    val request =
+      s"""{
+         |  "using": ["urn:ietf:params:jmap:core", "urn:ietf:params:jmap:mail"],
+         |  "methodCalls": [[
+         |    "Email/query",
+         |    {
+         |      "accountId": "29883977c13473ae7cb7678ef767cbfbaffc8a44a6e463d971d23a65c1dc4af6",
+         |      "sort": [{"property":"subject"}]
+         |    },
+         |    "c1"]]
+         |}""".stripMargin
+
+    awaitAtMostTenSeconds.untilAsserted { () =>
+      val response = `given`
+        .header(ACCEPT.toString, ACCEPT_RFC8621_VERSION_HEADER)
+        .body(request)
+      .when
+        .post
+      .`then`
+        .statusCode(SC_OK)
+        .contentType(JSON)
+        .extract
+        .body
+        .asString
+
+    assertThatJson(response)
+      .inPath("$.methodResponses[0][1].ids")
+      .isEqualTo(s"""["${messageId2.serialize}", "${messageId1.serialize}", "${messageId3.serialize}"]""")
+    }
+  }
+
+  @Test
+  def listMailsShouldBeSortedWhenUsingTo(server: GuiceJamesServer): Unit = {
+    server.getProbe(classOf[MailboxProbeImpl]).createMailbox(MailboxPath.inbox(BOB))
+    val otherMailboxPath = MailboxPath.forUser(BOB, "other")
+    server.getProbe(classOf[MailboxProbeImpl]).createMailbox(otherMailboxPath)
+
+    val message1: Message = Message.Builder
+      .of
+      .setTo("aaa@domain.tld")
+      .setSubject("subject")
+      .setBody("any body", StandardCharsets.UTF_8)
+      .build
+    val messageId1: MessageId = server.getProbe(classOf[MailboxProbeImpl])
+      .appendMessage(BOB.asString, MailboxPath.inbox(BOB),
+        AppendCommand.builder().build(message1))
+      .getMessageId
+
+    val message2: Message = Message.Builder
+      .of
+      .setTo("ccc@domain.tld")
+      .setSubject("subject")
+      .setBody("any body", StandardCharsets.UTF_8)
+      .build
+    val messageId2 = server.getProbe(classOf[MailboxProbeImpl])
+      .appendMessage(BOB.asString, MailboxPath.inbox(BOB),
+        AppendCommand.builder().build(message2))
+      .getMessageId
+
+    val message3: Message = Message.Builder
+      .of
+      .setTo("aba@domain.tld")
+      .setSubject("subject")
+      .setBody("any body", StandardCharsets.UTF_8)
+      .build
+    val messageId3 = server.getProbe(classOf[MailboxProbeImpl])
+      .appendMessage(BOB.asString, MailboxPath.inbox(BOB),
+        AppendCommand.builder().build(message3))
+      .getMessageId
+
+    val request =
+      s"""{
+         |  "using": ["urn:ietf:params:jmap:core", "urn:ietf:params:jmap:mail"],
+         |  "methodCalls": [[
+         |    "Email/query",
+         |    {
+         |      "accountId": "29883977c13473ae7cb7678ef767cbfbaffc8a44a6e463d971d23a65c1dc4af6",
+         |      "sort": [{"property":"to"}]
+         |    },
+         |    "c1"]]
+         |}""".stripMargin
+
+    awaitAtMostTenSeconds.untilAsserted { () =>
+      val response = `given`
+        .header(ACCEPT.toString, ACCEPT_RFC8621_VERSION_HEADER)
+        .body(request)
+      .when
+        .post
+      .`then`
+        .statusCode(SC_OK)
+        .contentType(JSON)
+        .extract
+        .body
+        .asString
+
+    assertThatJson(response)
+      .inPath("$.methodResponses[0][1].ids")
+      .isEqualTo(s"""["${messageId1.serialize}", "${messageId3.serialize}", "${messageId2.serialize}"]""")
+    }
+  }
+
+  @Test
+  def listMailsShouldBeSortedWhenUsingFrom(server: GuiceJamesServer): Unit = {
+    server.getProbe(classOf[MailboxProbeImpl]).createMailbox(MailboxPath.inbox(BOB))
+    val otherMailboxPath = MailboxPath.forUser(BOB, "other")
+    server.getProbe(classOf[MailboxProbeImpl]).createMailbox(otherMailboxPath)
+
+    val message1: Message = Message.Builder
+      .of
+      .setFrom("aaa@domain.tld")
+      .setSubject("subject")
+      .setBody("any body", StandardCharsets.UTF_8)
+      .build
+    val messageId1: MessageId = server.getProbe(classOf[MailboxProbeImpl])
+      .appendMessage(BOB.asString, MailboxPath.inbox(BOB),
+        AppendCommand.builder().build(message1))
+      .getMessageId
+
+    val message2: Message = Message.Builder
+      .of
+      .setFrom("ccc@domain.tld")
+      .setSubject("subject")
+      .setBody("any body", StandardCharsets.UTF_8)
+      .build
+    val messageId2 = server.getProbe(classOf[MailboxProbeImpl])
+      .appendMessage(BOB.asString, MailboxPath.inbox(BOB),
+        AppendCommand.builder().build(message2))
+      .getMessageId
+
+    val message3: Message = Message.Builder
+      .of
+      .setFrom("aba@domain.tld")
+      .setSubject("subject")
+      .setBody("any body", StandardCharsets.UTF_8)
+      .build
+    val messageId3 = server.getProbe(classOf[MailboxProbeImpl])
+      .appendMessage(BOB.asString, MailboxPath.inbox(BOB),
+        AppendCommand.builder().build(message3))
+      .getMessageId
+
+    val request =
+      s"""{
+         |  "using": ["urn:ietf:params:jmap:core", "urn:ietf:params:jmap:mail"],
+         |  "methodCalls": [[
+         |    "Email/query",
+         |    {
+         |      "accountId": "29883977c13473ae7cb7678ef767cbfbaffc8a44a6e463d971d23a65c1dc4af6",
+         |      "sort": [{"property":"from"}]
+         |    },
+         |    "c1"]]
+         |}""".stripMargin
+
+    awaitAtMostTenSeconds.untilAsserted { () =>
+      val response = `given`
+        .header(ACCEPT.toString, ACCEPT_RFC8621_VERSION_HEADER)
+        .body(request)
+      .when
+        .post
+      .`then`
+        .statusCode(SC_OK)
+        .contentType(JSON)
+        .extract
+        .body
+        .asString
+
+    assertThatJson(response)
+      .inPath("$.methodResponses[0][1].ids")
+      .isEqualTo(s"""["${messageId1.serialize}", "${messageId3.serialize}", "${messageId2.serialize}"]""")
+    }
+  }
+
+  @Test
   def listMailsShouldBeSortedByAscendingOrderOfInternalDateByDefaultWhenNoDateInHeader(server: GuiceJamesServer): Unit = {
     server.getProbe(classOf[MailboxProbeImpl]).createMailbox(MailboxPath.inbox(BOB))
     val otherMailboxPath = MailboxPath.forUser(BOB, "other")
@@ -2291,10 +2565,6 @@ trait EmailQueryMethodContract {
   @ValueSource(strings = Array(
     "allInThreadHaveKeyword",
     "someInThreadHaveKeyword",
-    "size",
-    "from",
-    "to",
-    "subject",
     "hasKeyword"
   ))
   def listMailsShouldReturnUnsupportedSortWhenPropertyFieldInComparatorIsValidButUnsupported(unsupported: String): Unit = {
diff --git a/server/protocols/jmap-rfc-8621/src/main/scala/org/apache/james/jmap/mail/EmailQuery.scala b/server/protocols/jmap-rfc-8621/src/main/scala/org/apache/james/jmap/mail/EmailQuery.scala
index b6358e1..1a7a676 100644
--- a/server/protocols/jmap-rfc-8621/src/main/scala/org/apache/james/jmap/mail/EmailQuery.scala
+++ b/server/protocols/jmap-rfc-8621/src/main/scala/org/apache/james/jmap/mail/EmailQuery.scala
@@ -158,7 +158,6 @@ sealed trait SortProperty {
 case object ReceivedAtSortProperty extends SortProperty {
   override def toSortClause: Either[UnsupportedSortException, SortClause] = scala.Right(SortClause.Arrival)
 }
-
 case object AllInThreadHaveKeywordSortProperty extends SortProperty {
   override def toSortClause: Either[UnsupportedSortException, SortClause] = Left(UnsupportedSortException("allInThreadHaveKeyword"))
 }
@@ -166,21 +165,20 @@ case object SomeInThreadHaveKeywordSortProperty extends SortProperty {
   override def toSortClause: Either[UnsupportedSortException, SortClause] = Left(UnsupportedSortException("someInThreadHaveKeyword"))
 }
 case object SizeSortProperty extends SortProperty {
-  override def toSortClause: Either[UnsupportedSortException, SortClause] = Left(UnsupportedSortException("size"))
+  override def toSortClause: Either[UnsupportedSortException, SortClause] = scala.Right(SortClause.Size)
 }
 case object FromSortProperty extends SortProperty {
-  override def toSortClause: Either[UnsupportedSortException, SortClause] = Left(UnsupportedSortException("from"))
+  override def toSortClause: Either[UnsupportedSortException, SortClause] = scala.Right(SortClause.MailboxFrom)
 }
 case object ToSortProperty extends SortProperty {
-  override def toSortClause: Either[UnsupportedSortException, SortClause] = Left(UnsupportedSortException("to"))
+  override def toSortClause: Either[UnsupportedSortException, SortClause] = scala.Right(SortClause.MailboxTo)
 }
 case object SubjectSortProperty extends SortProperty {
-  override def toSortClause: Either[UnsupportedSortException, SortClause] = Left(UnsupportedSortException("subject"))
+  override def toSortClause: Either[UnsupportedSortException, SortClause] = scala.Right(SortClause.BaseSubject)
 }
 case object HasKeywordSortProperty extends SortProperty {
   override def toSortClause: Either[UnsupportedSortException, SortClause] = Left(UnsupportedSortException("hasKeyword"))
 }
-
 case object SentAtSortProperty extends SortProperty {
   override def toSortClause: Either[UnsupportedSortException, SortClause] = scala.Right(SortClause.SentDate)
 }

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org


[james-project] 02/03: JAMES-3417 JMAP Email/query: advertise size, subject, from, to support

Posted by bt...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

btellier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit e52eacfc94e5a693b48a6587ca755b7bf3ded149
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Mon Apr 5 21:23:26 2021 +0700

    JAMES-3417 JMAP Email/query: advertise size, subject, from, to support
---
 .../org/apache/james/jmap/rfc8621/contract/CustomMethodContract.scala | 4 ++--
 .../apache/james/jmap/rfc8621/contract/SessionRoutesContract.scala    | 4 ++--
 .../src/main/scala/org/apache/james/jmap/core/Capabilities.scala      | 2 +-
 .../test/scala/org/apache/james/jmap/routes/SessionRoutesTest.scala   | 4 ++--
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/server/protocols/jmap-rfc-8621-integration-tests/jmap-rfc-8621-integration-tests-common/src/main/scala/org/apache/james/jmap/rfc8621/contract/CustomMethodContract.scala b/server/protocols/jmap-rfc-8621-integration-tests/jmap-rfc-8621-integration-tests-common/src/main/scala/org/apache/james/jmap/rfc8621/contract/CustomMethodContract.scala
index a0ad6f5..2ff1af2 100644
--- a/server/protocols/jmap-rfc-8621-integration-tests/jmap-rfc-8621-integration-tests-common/src/main/scala/org/apache/james/jmap/rfc8621/contract/CustomMethodContract.scala
+++ b/server/protocols/jmap-rfc-8621-integration-tests/jmap-rfc-8621-integration-tests-common/src/main/scala/org/apache/james/jmap/rfc8621/contract/CustomMethodContract.scala
@@ -68,7 +68,7 @@ object CustomMethodContract {
       |      "maxMailboxDepth" : null,
       |      "maxSizeMailboxName" : 200,
       |      "maxSizeAttachmentsPerEmail" : 20000000,
-      |      "emailQuerySortOptions" : ["receivedAt", "sentAt"],
+      |      "emailQuerySortOptions" : ["receivedAt", "sentAt", "size", "from", "to", "subject"],
       |      "mayCreateTopLevelMailbox" : true
       |    },
       |    "urn:ietf:params:jmap:websocket": {
@@ -110,7 +110,7 @@ object CustomMethodContract {
       |          "maxMailboxDepth" : null,
       |          "maxSizeMailboxName" : 200,
       |          "maxSizeAttachmentsPerEmail" : 20000000,
-      |          "emailQuerySortOptions" : ["receivedAt", "sentAt"],
+      |          "emailQuerySortOptions" : ["receivedAt", "sentAt", "size", "from", "to", "subject"],
       |          "mayCreateTopLevelMailbox" : true
       |        },
       |        "urn:apache:james:params:jmap:mail:quota": {},
diff --git a/server/protocols/jmap-rfc-8621-integration-tests/jmap-rfc-8621-integration-tests-common/src/main/scala/org/apache/james/jmap/rfc8621/contract/SessionRoutesContract.scala b/server/protocols/jmap-rfc-8621-integration-tests/jmap-rfc-8621-integration-tests-common/src/main/scala/org/apache/james/jmap/rfc8621/contract/SessionRoutesContract.scala
index 7f71277..f5407d2 100644
--- a/server/protocols/jmap-rfc-8621-integration-tests/jmap-rfc-8621-integration-tests-common/src/main/scala/org/apache/james/jmap/rfc8621/contract/SessionRoutesContract.scala
+++ b/server/protocols/jmap-rfc-8621-integration-tests/jmap-rfc-8621-integration-tests-common/src/main/scala/org/apache/james/jmap/rfc8621/contract/SessionRoutesContract.scala
@@ -60,7 +60,7 @@ object SessionRoutesContract {
                          |      "maxMailboxDepth" : null,
                          |      "maxSizeMailboxName" : 200,
                          |      "maxSizeAttachmentsPerEmail" : 20000000,
-                         |      "emailQuerySortOptions" : ["receivedAt", "sentAt"],
+                         |      "emailQuerySortOptions" : ["receivedAt", "sentAt", "size", "from", "to", "subject"],
                          |      "mayCreateTopLevelMailbox" : true
                          |    },
                          |    "urn:ietf:params:jmap:websocket": {
@@ -101,7 +101,7 @@ object SessionRoutesContract {
                          |          "maxMailboxDepth" : null,
                          |          "maxSizeMailboxName" : 200,
                          |          "maxSizeAttachmentsPerEmail" : 20000000,
-                         |          "emailQuerySortOptions" : ["receivedAt", "sentAt"],
+                         |          "emailQuerySortOptions" : ["receivedAt", "sentAt", "size", "from", "to", "subject"],
                          |          "mayCreateTopLevelMailbox" : true
                          |        },
                          |        "urn:apache:james:params:jmap:mail:quota": {},
diff --git a/server/protocols/jmap-rfc-8621/src/main/scala/org/apache/james/jmap/core/Capabilities.scala b/server/protocols/jmap-rfc-8621/src/main/scala/org/apache/james/jmap/core/Capabilities.scala
index cb6daed..ef46ff0 100644
--- a/server/protocols/jmap-rfc-8621/src/main/scala/org/apache/james/jmap/core/Capabilities.scala
+++ b/server/protocols/jmap-rfc-8621/src/main/scala/org/apache/james/jmap/core/Capabilities.scala
@@ -44,7 +44,7 @@ object DefaultCapabilities {
       MaxMailboxDepth(None),
       MaxSizeMailboxName(200L),
       MaxSizeAttachmentsPerEmail(20_000_000L),
-      emailQuerySortOptions = List("receivedAt", "sentAt"),
+      emailQuerySortOptions = List("receivedAt", "sentAt", "size", "from", "to", "subject"),
       MayCreateTopLevelMailbox(true)))
   val QUOTA_CAPABILITY = QuotaCapability()
   val SHARES_CAPABILITY = SharesCapability()
diff --git a/server/protocols/jmap-rfc-8621/src/test/scala/org/apache/james/jmap/routes/SessionRoutesTest.scala b/server/protocols/jmap-rfc-8621/src/test/scala/org/apache/james/jmap/routes/SessionRoutesTest.scala
index 8fb5057..56458f2 100644
--- a/server/protocols/jmap-rfc-8621/src/test/scala/org/apache/james/jmap/routes/SessionRoutesTest.scala
+++ b/server/protocols/jmap-rfc-8621/src/test/scala/org/apache/james/jmap/routes/SessionRoutesTest.scala
@@ -141,7 +141,7 @@ class SessionRoutesTest extends AnyFlatSpec with BeforeAndAfter with Matchers {
                          |      "maxMailboxDepth" : null,
                          |      "maxSizeMailboxName" : 200,
                          |      "maxSizeAttachmentsPerEmail" : 20000000,
-                         |      "emailQuerySortOptions" : ["receivedAt", "sentAt"],
+                         |      "emailQuerySortOptions" : ["receivedAt", "sentAt", "size", "from", "to", "subject"],
                          |      "mayCreateTopLevelMailbox" : true
                          |    },
                          |    "urn:ietf:params:jmap:websocket": {
@@ -181,7 +181,7 @@ class SessionRoutesTest extends AnyFlatSpec with BeforeAndAfter with Matchers {
                          |          "maxMailboxDepth" : null,
                          |          "maxSizeMailboxName" : 200,
                          |          "maxSizeAttachmentsPerEmail" : 20000000,
-                         |          "emailQuerySortOptions" : ["receivedAt", "sentAt"],
+                         |          "emailQuerySortOptions" : ["receivedAt", "sentAt", "size", "from", "to", "subject"],
                          |          "mayCreateTopLevelMailbox" : true
                          |        },
                          |        "urn:apache:james:params:jmap:mail:quota": {},

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org


[james-project] 03/03: JAMES-3417 JMAP Documentation: Email/query supports size, subject, from, to sorts

Posted by bt...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

btellier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit f5192ea686842759e4bcf5a4a21968c576c8353c
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Mon Apr 5 22:36:43 2021 +0700

    JAMES-3417 JMAP Documentation: Email/query supports size, subject, from, to sorts
---
 server/protocols/jmap-rfc-8621/doc/specs/spec/mail/message.mdown | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/server/protocols/jmap-rfc-8621/doc/specs/spec/mail/message.mdown b/server/protocols/jmap-rfc-8621/doc/specs/spec/mail/message.mdown
index 8aace94..1dd8012 100644
--- a/server/protocols/jmap-rfc-8621/doc/specs/spec/mail/message.mdown
+++ b/server/protocols/jmap-rfc-8621/doc/specs/spec/mail/message.mdown
@@ -764,10 +764,6 @@ The following values for the *property* field on the Comparator object SHOULD be
 
 > :warning:
 > These properties are not supported yet for sorting:
-> - size
-> - from
-> - to
-> - subject
 > - hasKeyword
 > - allInThreadHaveKeyword
 > - someInThreadHaveKeyword

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org