]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/Enjit/enjitqueuehandler.php
Merge branch '1.0.x' of gitorious.org:statusnet/mainline into 1.0.x
[quix0rs-gnu-social.git] / plugins / Enjit / enjitqueuehandler.php
index f0e706b929fd2182a7735eae21ea82ad0067702b..284f29477c9782bce22117653f2341ad37ec15c5 100644 (file)
@@ -23,7 +23,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
 
 /**
  * Queue handler for watching new notices and posting to enjit.
- * @fixme is this actually being used/functional atm?
+ * @todo FIXME: Is this actually being used/functional atm?
  */
 class EnjitQueueHandler extends QueueHandler
 {
@@ -32,14 +32,7 @@ class EnjitQueueHandler extends QueueHandler
         return 'enjit';
     }
 
-    function start()
-    {
-        $this->log(LOG_INFO, "Starting EnjitQueueHandler");
-        $this->log(LOG_INFO, "Broadcasting to ".common_config('enjit', 'apiurl'));
-        return true;
-    }
-
-    function handle_notice($notice)
+    function handle($notice)
     {
 
         $profile = Profile::staticGet($notice->profile_id);
@@ -52,7 +45,7 @@ class EnjitQueueHandler extends QueueHandler
         }
 
         #
-        # Build an Atom message from the notice
+        // Build an Atom message from the notice
         #
         $noticeurl = common_local_url('shownotice', array('notice' => $notice->id));
         $msg = $profile->nickname . ': ' . $notice->content;
@@ -80,12 +73,11 @@ class EnjitQueueHandler extends QueueHandler
         );
 
         #
-        # POST the message to $config['enjit']['apiurl']
+        // POST the message to $config['enjit']['apiurl']
         #
         $request = HTTPClient::start();
         $response = $request->post($url, null, $data);
 
         return $response->isOk();
     }
-
 }