chibenwa commented on a change in pull request #481:
URL: https://github.com/apache/james-project/pull/481#discussion_r648847760
##########
File path:
mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMessageManager.java
##########
@@ -939,4 +944,8 @@ public Flags getApplicableFlags(MailboxSession session)
throws MailboxException
public EnumSet<MessageCapabilities> getSupportedMessageCapabilities() {
return messageCapabilities;
}
+
+ public ThreadId getThreadIdOfAMessage(MailboxMessage mailboxMessage) {
Review comment:
Why do we need this getter?
##########
File path:
mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMessageManager.java
##########
@@ -164,12 +166,14 @@ private MediaType(String mediaType, String subType) {
private final BatchSizes batchSizes;
private final PreDeletionHooks preDeletionHooks;
private final MessageStorer messageStorer;
+ private final ThreadIdGuessingAlgorithm threadIdGuessingAlgorithm;
Review comment:
Where do we use this field?
##########
File path:
mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/ThreadIdGuessingAlgorithm.java
##########
@@ -0,0 +1,27 @@
+/******************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one *
+ * or more contributor license agreements. See the NOTICE file *
+ * distributed with this work for additional information *
+ * regarding copyright ownership. The ASF licenses this file *
+ * to you under the Apache License, Version 2.0 (the *
+ * "License"); you may not use this file except in compliance *
+ * with the License. You may obtain a copy of the License at *
+ * *
+ * http://www.apache.org/licenses/LICENSE-2.0 *
+ * *
+ * Unless required by applicable law or agreed to in writing, *
+ * software distributed under the License is distributed on an *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY *
+ * KIND, either express or implied. See the License for the *
+ * specific language governing permissions and limitations *
+ * under the License. *
+ ******************************************************************/
+
+package org.apache.james.mailbox.store.mail;
+
+import org.apache.james.mailbox.model.ThreadId;
+import org.apache.james.mailbox.store.mail.model.MailboxMessage;
+
+public interface ThreadIdGuessingAlgorithm {
+ ThreadId getThreadId(MailboxMessage mailboxMessage);
Review comment:
```suggestion
ThreadId getThreadId(MessageId messageId, List<References> references,
Subject subject);
```
With
```
public class Reference {
private final String value;
// ...
}
```
and
```
public class Subject {
private final String value;
// ...
}
```
Where references aggegates the In-Reply-To // References header fields.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]