You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by bt...@apache.org on 2026/08/15 04:22:49 UTC
(james-project) 02/02: JAMES-4218 Selection should reset applicable flags
This is an automated email from the ASF dual-hosted git repository.
chibenwa pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git
commit e1d01032363583776ce98b999e102cb437146758
Author: Benoit TELLIER <bt...@linagora.com>
AuthorDate: Fri Aug 14 12:02:17 2026 +0700
JAMES-4218 Selection should reset applicable flags
---
.../james/imap/scripts/UserFlagsSupport.test | 31 +++++++++++++++++++++-
.../imap/processor/AbstractSelectionProcessor.java | 1 +
2 files changed, 31 insertions(+), 1 deletion(-)
diff --git a/mpt/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/UserFlagsSupport.test b/mpt/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/UserFlagsSupport.test
index 32c68ebf1a..d14994a316 100644
--- a/mpt/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/UserFlagsSupport.test
+++ b/mpt/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/UserFlagsSupport.test
@@ -77,4 +77,33 @@ S: A9 OK (\[.+\] )?APPEND completed\.
C: A10 FETCH 2:2 (FLAGS)
S: \* 2 FETCH \(FLAGS \(\\Recent appendflag\)\)
-S: A10 OK FETCH completed.
\ No newline at end of file
+S: A10 OK FETCH completed.
+
+C: A11 CREATE othermailbox
+S: A11 OK \[MAILBOXID \(.+\)\] CREATE completed\.
+
+C: A12 SELECT othermailbox
+S: \* OK \[MAILBOXID \(.+\)\] Ok
+S: \* FLAGS \(\\Answered \\Deleted \\Draft \\Flagged \\Seen\)
+S: \* 0 EXISTS
+S: \* 0 RECENT
+S: \* OK \[UIDVALIDITY \d+\].*
+S: \* OK \[PERMANENTFLAGS \(\\Answered \\Deleted \\Draft \\Flagged \\\Seen( \\\*)?\)\].*
+S: \* OK \[HIGHESTMODSEQ \d+\].*
+S: \* OK \[UIDNEXT 1\].*
+S: A12 OK \[READ-WRITE\] SELECT completed\.
+
+C: A13 SELECT testmailbox
+S: \* OK \[MAILBOXID \(.+\)\] Ok
+S: \* FLAGS \(.*appendflag.*\)
+S: \* 2 EXISTS
+S: \* \d+ RECENT
+S: \* OK \[UIDVALIDITY \d+\].*
+S: \* OK \[UNSEEN 1\].*
+S: \* OK \[PERMANENTFLAGS \(.*appendflag.*\\\*\)\] Limited
+S: \* OK \[HIGHESTMODSEQ \d+\].*
+S: \* OK \[UIDNEXT 3\].*
+S: A13 OK \[READ-WRITE\] SELECT completed\.
+
+C: A14 NOOP
+S: A14 OK NOOP completed\.
\ No newline at end of file
diff --git a/protocols/imap/src/main/java/org/apache/james/imap/processor/AbstractSelectionProcessor.java b/protocols/imap/src/main/java/org/apache/james/imap/processor/AbstractSelectionProcessor.java
index 6b66ead2e4..a241bbc606 100644
--- a/protocols/imap/src/main/java/org/apache/james/imap/processor/AbstractSelectionProcessor.java
+++ b/protocols/imap/src/main/java/org/apache/james/imap/processor/AbstractSelectionProcessor.java
@@ -153,6 +153,7 @@ abstract class AbstractSelectionProcessor<R extends AbstractMailboxSelectionRequ
.doOnNext(metaData -> {
SelectedMailbox selected = session.getSelected();
permanentFlags(responder, metaData.getPermanentFlags(), selected);
+ selected.resetNewApplicableFlags();
highestModSeq(responder, metaData);
uidNext(responder, metaData);
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org