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 05:58:00 UTC
[jira] [Created] (JAMES-3558) Email/query ommits message moves
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: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org