diff options
author | Anna Larch <anna@nextcloud.com> | 2021-03-02 10:13:14 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-02 10:13:14 +0300 |
commit | 8b3a48bb5edefb820769a4c256434ffdc57a0a36 (patch) | |
tree | c0cc57355b62b80ce7af4dd002b98ee5b77351d8 /lib | |
parent | 822c097080e686a38d873bfc10ada06942e8315d (diff) | |
parent | 0b249c188181110a4f2ecb6ec4a9d91fef041579 (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.php | 2 |
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); } } |