From a775474dff73e0e17e95bcfee42caeecdacf5295 Mon Sep 17 00:00:00 2001 From: Friendika Date: Wed, 24 Aug 2011 04:42:28 -0700 Subject: cleaned up the conditions on when to and when not to relay. --- include/diaspora.php | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'include/diaspora.php') diff --git a/include/diaspora.php b/include/diaspora.php index 563eaa4e2..75d47e05a 100644 --- a/include/diaspora.php +++ b/include/diaspora.php @@ -544,7 +544,6 @@ function diaspora_comment($importer,$xml,$msg) { if($parent_author_signature) { -// $owner_signed_data = $guid . ';' . $parent_guid . ';' . $text . ';' . $msg['author']; $owner_signed_data = $guid . ';' . $parent_guid . ';' . $text . ';' . $diaspora_handle; $parent_author_signature = base64_decode($parent_author_signature); @@ -619,13 +618,14 @@ function diaspora_comment($importer,$xml,$msg) { dbesc(base64_encode($author_signature)), dbesc($diaspora_handle) ); - } - // notify others -// proc_run('php','include/notifier.php','comment',$message_id); + // if the message isn't already being relayed, notify others + // the existence of parent_author_signature means the parent_author or owner + // is already relaying. + proc_run('php','include/notifier.php','comment',$message_id); + } return; - } function diaspora_photo($importer,$xml,$msg) { @@ -845,8 +845,12 @@ EOT; ); } - // notify others -// proc_run('php','include/notifier.php','comment',$message_id); + // if the message isn't already being relayed, notify others + // the existence of parent_author_signature means the parent_author or owner + // is already relaying. + + if(! $parent_author_signature) + proc_run('php','include/notifier.php','comment',$message_id); return; } -- cgit v1.2.3