linagora / james-project

Mirror of Apache James Project
Apache License 2.0
70 stars 63 forks source link

JAMES-4026 Fix inconsistency IMAP - JMAP keyword test for JMAP RFC #5158

Closed Arsnael closed 3 months ago

Arsnael commented 3 months ago

When migrating some tests from jmap draft to jmap rfc, an issue was identified regarding conflicts introduced via IMAP on keywords when trying to solve it via jmap email/set method

If we have a message m1 in 2 mailboxes m1 and m2, if we add a flag \Flagged via IMAP on the message in mailbox m2, we create an inconsistency for JMAP. Normally, if we set via email/set the flag to $Flagged for m1, it should fix the inconsistency, having the keyword for the message present in both mailboxes.

However, it does not happen right now, as it seems when doing an update on email, we do union of keywords regarding the metadata, and if it's the same as new flags (which is the case here) then we do nothing, thus not fixing the inconsistency.

The fix is a bit tricky, as some simple solution have been attempted while creating issues elsewhere.

need to investigate deeper and fix the issue for JMAP RFC implementation

Arsnael commented 3 months ago

https://github.com/apache/james-project/pull/2194