You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by "Benoit Tellier (Jira)" <se...@james.apache.org> on 2021/04/09 06:21:00 UTC

[jira] [Commented] (JAMES-3558) Email/query ommits message moves

    [ https://issues.apache.org/jira/browse/JAMES-3558?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17317694#comment-17317694 ] 

Benoit Tellier commented on JAMES-3558:
---------------------------------------

Wrote the fix: https://github.com/apache/james-project/pull/378

> 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
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> 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: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org