Details

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

    Description

      This should be a simple implementation of the deletion for `Mailbox/set`. It should follow the JMAP core specification section /set https://jmap.io/spec-core.html#set

      *JSON request*

      You will need to add to the existing `Mailbox/set` request the following property:

      • *destroy*: `Id[]|null` A list of ids for Mailbox objects to permanently delete, or null if no objects are to be destroyed.
      json
      {
       "using": [ "urn:ietf:params:jmap:core", "urn:ietf:params:jmap:mail" ],
       "methodCalls": [
       [
       "Mailbox/set", 
       {
       "accountId": "JMAP-ID",
       "ifInState": "123",
       "create": null,
       "destroy": [ "0001", "0002" ]
       }
       ]
       ]
      }
      

      Notes:

      • `onDestroyRemoveEmails` will be handled in #1741 . It should not be possible to delete a mailbox if it still has some emails in it for the moment, as it's the default behavior.
      • we need to handle the case of deleting multiple mailboxes in one request

      *JSON response*

      The existing response should add the following property:

      • *destroyed*: `Id[]|null` A list of Mailbox ids for records that were successfully destroyed, or null if none.
      json
      {
       "methodResponses": [
       [
       "Mailbox/set", 
       {
       "accountId": "JMAP-ID", // the requested accountId
       "oldState": "123",
       "newState": "124",
       "created": null,
       "destroyed": [ "0001", "0002" ]
       }
       ]
       ], 
       "sessionState": "abc"
      }
      

      Note:

      • `notDestroyed` and error handling will be handled in #1742

      *DoD*: unit and integration tests (memory and distributed james) + proof of deletion of multiple objects in a single request

      Attachments

        Activity

          People

            Unassigned Unassigned
            ducnv Nguyễn Việt Đức
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: