From: Evan Prodromou Date: Mon, 22 Feb 2010 04:39:52 +0000 (-0500) Subject: some info code for usersalmon.php X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a9599d53c5e33eff2927f02393b9ae6984ba3a6e;p=quix0rs-gnu-social.git some info code for usersalmon.php --- diff --git a/plugins/OStatus/OStatusPlugin.php b/plugins/OStatus/OStatusPlugin.php index 548c877118..3ac2bb87d7 100644 --- a/plugins/OStatus/OStatusPlugin.php +++ b/plugins/OStatus/OStatusPlugin.php @@ -205,6 +205,8 @@ class OStatusPlugin extends Plugin if (!empty($oprofile) && !empty($oprofile->salmonuri)) { + common_log(LOG_INFO, "Sending notice '{$notice->uri}' to remote profile '{$oprofile->uri}'."); + // FIXME: this needs to go out in a queue handler $xml = ''; diff --git a/plugins/OStatus/actions/usersalmon.php b/plugins/OStatus/actions/usersalmon.php index 8368eeccf0..c8a16e06fa 100644 --- a/plugins/OStatus/actions/usersalmon.php +++ b/plugins/OStatus/actions/usersalmon.php @@ -55,6 +55,8 @@ class UsersalmonAction extends SalmonAction */ function handlePost() { + common_log(LOG_INFO, "Received post of '{$this->act->object->id}' from '{$this->act->actor->id}'"); + switch ($this->act->object->type) { case ActivityObject::ARTICLE: case ActivityObject::BLOGENTRY: @@ -92,6 +94,7 @@ class UsersalmonAction extends SalmonAction if (!empty($existing)) { common_log(LOG_ERR, "Not saving notice '{$existing->uri}'; already exists."); + return; } $this->saveNotice();