]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
extra logging for OStatus enqueuing
authorEvan Prodromou <evan@status.net>
Wed, 29 Jun 2011 17:20:18 +0000 (13:20 -0400)
committerEvan Prodromou <evan@status.net>
Wed, 29 Jun 2011 17:20:18 +0000 (13:20 -0400)
plugins/OStatus/OStatusPlugin.php

index 1a02cdc8d304b54f37f18ffa5a86df9b42b20b43..36259b8abbe3c77b070204a2ea6b73c8e4eef650 100644 (file)
@@ -125,11 +125,18 @@ class OStatusPlugin extends Plugin
      */
     function onStartEnqueueNotice($notice, &$transports)
     {
-        // FIXME: we don't do privacy-controlled OStatus updates yet.
-        // once that happens, finer grain of control here.
-        if ($notice->isLocal() && $notice->inScope(null)) {
-            // put our transport first, in case there's any conflict (like OMB)
-            array_unshift($transports, 'ostatus');
+        if ($notice->isLocal()) {
+                if ($notice->inScope(null)) {  
+               // put our transport first, in case there's any conflict (like OMB)
+               array_unshift($transports, 'ostatus');
+                       $this->log(LOG_INFO, "Notice {$notice->id} queued for OStatus processing");
+                } else {
+                       // FIXME: we don't do privacy-controlled OStatus updates yet.
+                       // once that happens, finer grain of control here.
+                       $this->log(LOG_NOTICE, "Not queueing notice {$notice->id} for OStatus because of privacy; scope = {$notice->scope}");
+                }
+        } else {
+               $this->log(LOG_NOTICE, "Not queueing notice {$notice->id} for OStatus because it's not local.");
         }
         return true;
     }