Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/mail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/IMAP/Threading/ThreadBuilder.php')
-rw-r--r--lib/IMAP/Threading/ThreadBuilder.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/IMAP/Threading/ThreadBuilder.php b/lib/IMAP/Threading/ThreadBuilder.php
index 84bcc8cb3..2b3c18f82 100644
--- a/lib/IMAP/Threading/ThreadBuilder.php
+++ b/lib/IMAP/Threading/ThreadBuilder.php
@@ -114,7 +114,7 @@ class ThreadBuilder {
// Step 1.C
//$parentId = $message->getReferences()[count($message->getReferences()) - 1] ?? null;
//$container->setParent($idTable[$parentId] ?? null);
- if ($parent === null || !$parent->hasAncestor($container)) {
+ if (($parent === null || !$parent->hasAncestor($container)) && $container !== $parent) {
$container->setParent($parent);
}
}