Clone sync deletions to comments (which belong to you) on wall posts (which do not).

This commit is contained in:
zotlabs 2017-10-02 16:26:33 -07:00
parent 9dcbef4cb1
commit 5abdee73ee

View File

@ -1106,12 +1106,17 @@ class Item extends \Zotlabs\Web\Controller {
// if this is a different page type or it's just a local delete // if this is a different page type or it's just a local delete
// but not by the item author or owner, do a simple deletion // but not by the item author or owner, do a simple deletion
$complex = false;
if(intval($i[0]['item_type']) || ($local_delete && (! $can_delete))) { if(intval($i[0]['item_type']) || ($local_delete && (! $can_delete))) {
drop_item($i[0]['id']); drop_item($i[0]['id']);
} }
else { else {
// complex deletion that needs to propagate and be performed in phases // complex deletion that needs to propagate and be performed in phases
drop_item($i[0]['id'],true,DROPITEM_PHASE1); drop_item($i[0]['id'],true,DROPITEM_PHASE1);
$complex = true;
}
$r = q("select * from item where id = %d", $r = q("select * from item where id = %d",
intval($i[0]['id']) intval($i[0]['id'])
); );
@ -1120,6 +1125,8 @@ class Item extends \Zotlabs\Web\Controller {
$sync_item = fetch_post_tags($r); $sync_item = fetch_post_tags($r);
build_sync_packet($i[0]['uid'],array('item' => array(encode_item($sync_item[0],true)))); build_sync_packet($i[0]['uid'],array('item' => array(encode_item($sync_item[0],true))));
} }
if($complex) {
tag_deliver($i[0]['uid'],$i[0]['id']); tag_deliver($i[0]['uid'],$i[0]['id']);
} }
} }