Uploaded image for project: 'James Server'
  1. James Server
  2. JAMES-2884 Update JMAP implementation to conform to RFC 8620/8621
  3. JAMES-3376

Implement Email/query - unlock single request INBOX content loading

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.6.0
    • 3.6.0
    • JMAP
    • None

    Description

      1. Why

      Email query allows retrieving the mailboxId of (among others) the INBOX. It empowers a single request load for INBOX (woop)

        1. DOD
      • Write an integretion test loading, for the connected user, without using any provisioned id in the request, loads the 20 first mail previews in the INBOX mailbox.

      (sentAt sorting, ascending, 30 last items)

        1. How

      Implement the email query method in order to resolve mailbox by role (`role` filter condition). Any other role/filter should be ignored/

      Write integretaion tests for this method. Don't forget to document the limitation.

      `sortAsTree` and `filterAsTree` should not be supported.

      JsonPath resolution might also need in array resolution:

      ```

      { "resultOf": "c1", "name": "Mailbox/query", "path": "list[0]" }

      ```

        1. Example

      Here is a single request example:

      ```
      {
      "using": [
      "urn:ietf:params:jmap:core",
      "urn:ietf:params:jmap:mail"],
      "methodCalls": [[
      "Mailbox/query",
      {
      "accountId": "29883977c13473ae7cb7678ef767cbfbaffc8a44a6e463d971d23a65c1dc4af6",
      "filter":

      { "role": "Inbox" }

      },
      "c1"]]
      }
      ```

      Would reply:

      ```
      {
      "sessionState": "75128aab4b1b",
      "methodResponses": [[
      "Mailbox/query",

      { "accountId": "29883977c13473ae7cb7678ef767cbfbaffc8a44a6e463d971d23a65c1dc4af6", "queryState": "xyz", "canCalculateChanges": false, "position": 0, "limit": 256, "ids": ["zeifgzeyrgf"] }

      ,
      "c1"
      ]]
      }
      ```

      Here is an example query for full account loading :

      ```
      {
      "using": ["urn:ietf:params:jmap:core", "urn:ietf:params:jmap:mail"],
      "methodCalls": [[
      "Mailbox/query",
      {
      "accountId": "29883977c13473ae7cb7678ef767cbfbaffc8a44a6e463d971d23a65c1dc4af6",
      "filter":

      { "role": "Inbox" }

      },
      "c1"
      ],[
      "Email/query",
      {
      "accountId": "29883977c13473ae7cb7678ef767cbfbaffc8a44a6e463d971d23a65c1dc4af6"
      "filter" {
      "#inMailbox":

      { "resultOf":"c1", "name":"Mailbox/query", "path":"list[0]" }

      },
      "sort"

      { "property": "sentAt", "isAscending": true }

      },
      "c2"],[
      "Email/get",
      {
      "accountId": "29883977c13473ae7cb7678ef767cbfbaffc8a44a6e463d971d23a65c1dc4af6",
      "properties": ["id", "preview"],
      "#ids":

      { "resultOf":"c2", "name":"Email/query", "path":"list/*" }

      },
      "c3"]
      ]
      }
      ```

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            aduprat Antoine Duprat
            btellier Benoit Tellier
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment