When deleting, don't send the parent via DFRN
authorMichael <heluecht@pirati.ca>
Thu, 1 Mar 2018 20:44:44 +0000 (20:44 +0000)
committerMichael <heluecht@pirati.ca>
Thu, 1 Mar 2018 20:44:44 +0000 (20:44 +0000)
src/Worker/Delivery.php

index b8eceb0..fe6fad6 100644 (file)
@@ -242,7 +242,8 @@ class Delivery {
                                                }
 
                                                if ($normal_mode) {
-                                                       if ($item_id == $item['id'] || $item['id'] == $item['parent']) {
+                                                       // Only add the parent when we don't delete other items.
+                                                       if ($item_id == $item['id'] || (($item['id'] == $item['parent']) && ($cmd != 'drop'))) {
                                                                $item["entry:comment-allow"] = true;
                                                                $item["entry:cid"] = (($top_level) ? $contact['id'] : 0);
                                                                $msgitems[] = $item;