Benoit Tellier created JAMES-3558:
-------------------------------------

             Summary: Email/query ommits message moves
                 Key: JAMES-3558
                 URL: https://issues.apache.org/jira/browse/JAMES-3558
             Project: James Server
          Issue Type: Bug
            Reporter: Benoit Tellier


h3. Steps to reproduce

Move an email:

{code:java}
{
  "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"]]
}
{code}

Then perform an /changes request:

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

We expect the message to be reported as updated

The message is actually "destroyed"

h3. 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.

h3. 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.





--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to