mirror of
https://github.com/friendica/friendica
synced 2025-05-19 20:24:10 +02:00
Merge pull request #9628 from annando/dfrn-delete
Don't create the parent during a deletion
This commit is contained in:
commit
a863228e09
2 changed files with 17 additions and 9 deletions
|
@ -296,13 +296,17 @@ class Delivery
|
|||
$msgitems = [$target_item];
|
||||
$atom = DFRN::entries($msgitems, $owner);
|
||||
} else {
|
||||
$msgitems = [];
|
||||
foreach ($items as $item) {
|
||||
// Only add the parent when we don't delete other items.
|
||||
if (($target_item['id'] == $item['id']) || ($cmd != self::DELETION)) {
|
||||
$item["entry:comment-allow"] = true;
|
||||
$item["entry:cid"] = ($top_level ? $contact['id'] : 0);
|
||||
$msgitems[] = $item;
|
||||
if ($target_item['deleted']) {
|
||||
$msgitems = [$target_item];
|
||||
} else {
|
||||
$msgitems = [];
|
||||
foreach ($items as $item) {
|
||||
// Only add the parent when we don't delete other items.
|
||||
if (($target_item['id'] == $item['id']) || ($cmd != self::DELETION)) {
|
||||
$item["entry:comment-allow"] = true;
|
||||
$item["entry:cid"] = ($top_level ? $contact['id'] : 0);
|
||||
$msgitems[] = $item;
|
||||
}
|
||||
}
|
||||
}
|
||||
$atom = DFRN::entries($msgitems, $owner);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue