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 2023/12/04 08:38:07 UTC
(james-project) 02/07: JAMES-2586 - Fixup PostgresMessageMapper findMailbox method - ensuring the message was sorted
This is an automated email from the ASF dual-hosted git repository.
rcordier pushed a commit to branch postgresql
in repository https://gitbox.apache.org/repos/asf/james-project.git
commit 68f002dcca6cb1a8ac635c69bba55c0d65ee79cf
Author: Tung Tran <vt...@linagora.com>
AuthorDate: Thu Nov 30 11:38:01 2023 +0700
JAMES-2586 - Fixup PostgresMessageMapper findMailbox method - ensuring the message was sorted
---
.../apache/james/mailbox/postgres/mail/PostgresMessageMapper.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/mailbox/postgres/src/main/java/org/apache/james/mailbox/postgres/mail/PostgresMessageMapper.java b/mailbox/postgres/src/main/java/org/apache/james/mailbox/postgres/mail/PostgresMessageMapper.java
index 620d48df7c..badeadbf1b 100644
--- a/mailbox/postgres/src/main/java/org/apache/james/mailbox/postgres/mail/PostgresMessageMapper.java
+++ b/mailbox/postgres/src/main/java/org/apache/james/mailbox/postgres/mail/PostgresMessageMapper.java
@@ -26,6 +26,7 @@ import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.time.Clock;
+import java.util.Comparator;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
@@ -157,7 +158,9 @@ public class PostgresMessageMapper implements MessageMapper {
default:
return Flux.error(new RuntimeException("Unknown FetchType " + fetchType));
}
- });
+ })
+ .sort(Comparator.comparing(MailboxMessage::getUid))
+ .map(message -> message);
}
private Mono<Content> retrieveFullContent(String blobIdString) {
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org