You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by rc...@apache.org on 2021/04/27 02:53:43 UTC

[james-project] 02/06: JAMES-3277 Distinct uids before calling toRanges

This is an automated email from the ASF dual-hosted git repository.

rcordier pushed a commit to branch 3.6.x
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit 0a1cf6dfa13982c9543f09eec0e84087796cc34e
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Fri Apr 9 11:58:26 2021 +0700

    JAMES-3277 Distinct uids before calling toRanges
    
    Duplicates prevented toRanges to work properly...
---
 .../scala/org/apache/james/jmap/method/EmailSetUpdatePerformer.scala    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/protocols/jmap-rfc-8621/src/main/scala/org/apache/james/jmap/method/EmailSetUpdatePerformer.scala b/server/protocols/jmap-rfc-8621/src/main/scala/org/apache/james/jmap/method/EmailSetUpdatePerformer.scala
index d40273b..2860a54 100644
--- a/server/protocols/jmap-rfc-8621/src/main/scala/org/apache/james/jmap/method/EmailSetUpdatePerformer.scala
+++ b/server/protocols/jmap-rfc-8621/src/main/scala/org/apache/james/jmap/method/EmailSetUpdatePerformer.scala
@@ -140,7 +140,7 @@ class EmailSetUpdatePerformer @Inject() (serializer: EmailSetSerializer,
   private def asRanges(metaData: Map[MessageId, Traversable[ComposedMessageIdWithMetaData]]) =
     MessageRange.toRanges(metaData.values
       .flatten.map(_.getComposedMessageId.getUid)
-      .toList.asJava)
+      .toList.distinct.asJava)
       .asScala.toList
 
   private def updateFlagsByRange(mailboxId: MailboxId,

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org