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
path: root/lib
diff options
context:
space:
mode:
authorAnna Larch <anna@nextcloud.com>2021-03-02 10:13:14 +0300
committerGitHub <noreply@github.com>2021-03-02 10:13:14 +0300
commit8b3a48bb5edefb820769a4c256434ffdc57a0a36 (patch)
treec0cc57355b62b80ce7af4dd002b98ee5b77351d8 /lib
parent822c097080e686a38d873bfc10ada06942e8315d (diff)
parent0b249c188181110a4f2ecb6ec4a9d91fef041579 (diff)
Merge pull request #4628 from nextcloud/fix/threading-no-self-parent
Do now allow messages to be their own parents in threading
Diffstat (limited to 'lib')
-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);
}
}