diff options
author | friendica <info@friendica.com> | 2012-06-25 18:15:56 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-06-25 18:15:56 -0700 |
commit | f1991a59524ce36eea0b982954d90a6c55e59e41 (patch) | |
tree | c83c9da17a4780fcb9151fd8479347e4105ec072 /include/items.php | |
parent | f0b41709eb40237334de5d9a0ae7adbcd95fb841 (diff) | |
download | volse-hubzilla-f1991a59524ce36eea0b982954d90a6c55e59e41.tar.gz volse-hubzilla-f1991a59524ce36eea0b982954d90a6c55e59e41.tar.bz2 volse-hubzilla-f1991a59524ce36eea0b982954d90a6c55e59e41.zip |
propagate remote deletes
Diffstat (limited to 'include/items.php')
-rwxr-xr-x | include/items.php | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/include/items.php b/include/items.php index b90b5434f..7578bf155 100755 --- a/include/items.php +++ b/include/items.php @@ -2148,18 +2148,19 @@ function local_delivery($importer,$data) { } if($deleted) { + // check for relayed deletes to our conversation $is_reply = false; - $r = q("select * from item where uri = '%s' and id = parent limit 1", - dbesc($uri) + $r = q("select * from item where uri = '%s' and uid = %d limit 1", + dbesc($uri), + intval($importer['importer_uid']) ); if(count($r)) { $parent_uri = $r[0]['parent-uri']; - if($r[0]['parent-uri'] != $uri && $r[0]['thr-parent'] != $uri) + if($r[0]['id'] != $r[0]['parent']) $is_reply = true; } - if($is_reply) { $community = false; @@ -2295,8 +2296,10 @@ function local_delivery($importer,$data) { ); } } + // if this is a relayed delete, propagate it to other recipients + if($is_a_remote_delete) - proc_run('php',"include/notifier.php","delete",$item['id']); + proc_run('php',"include/notifier.php","drop",$item['id']); } } } |