Uploaded image for project: 'James Server'
  1. James Server
  2. JAMES-3558

Email/query ommits message moves

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.7.0, 3.6.1
    • None
    • None

    Description

      Steps to reproduce

      Move an email:

      {
        "using": [
          "urn:ietf:params:jmap:core",
          "urn:ietf:params:jmap:mail"],
        "methodCalls": [
        ["Email/set",
          {
            "accountId": "$ACCOUNT_ID",
            "update": {
              "${messageId.serialize}":{
                "mailboxIds": {
                  "${mailboxId2.serialize()}": true
                }
              }
            }
          },
          "c1"]]
      }
      

      Then perform an /changes request:

      {
        "using": ["urn:ietf:params:jmap:core", "urn:ietf:params:jmap:mail"],
        "methodCalls": [[
          "Email/changes",
          {
            "accountId": "$ACCOUNT_ID",
            "sinceState": "${oldState.getValue}"
          },
          "c1"]]
      }
      

      We expect the message to be reported as updated

      The message is actually "destroyed"

      Explanation

      Upon moves to events are generated:

      • added for the new mailbox
      • expunged in the old one

      When aggregating events together, only destroyed is returned.

      The fix

      Upon expunge, we need to check if the message can still be accessed by the user. If yes, we shall report it as "updated" and not destroyed.

      This 'fix' generated slightly more asynchronous reads upon moves but is likely acceptable.

      Attachments

        Activity

          People

            Unassigned Unassigned
            btellier Benoit Tellier
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1h
                1h