]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/unqueuemanager.php
Merge branch '0.9.x' of git://gitorious.org/statusnet/mainline into 0.9.x
[quix0rs-gnu-social.git] / lib / unqueuemanager.php
index ddfe6c0859540bd745ed5b3635ff1bcb098a8200..72dbc4eede6807034334f2243af32e7fa471452f 100644 (file)
  *
  * @category  QueueManager
  * @package   StatusNet
- * @author    Evan Prodromou <evan@controlyourself.ca>
- * @author    Sarven Capadisli <csarven@controlyourself.ca>
+ * @author    Evan Prodromou <evan@status.net>
+ * @author    Sarven Capadisli <csarven@status.net>
  * @copyright 2009 StatusNet, Inc.
  * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
- * @link      http://laconi.ca/
+ * @link      http://status.net/
  */
 
 class UnQueueManager
@@ -39,7 +39,7 @@ class UnQueueManager
          case 'omb':
             if ($this->_isLocal($notice)) {
                 require_once(INSTALLDIR.'/lib/omb.php');
-                omb_broadcast_remote_subscribers($notice);
+                omb_broadcast_notice($notice);
             }
             break;
          case 'public':
@@ -48,17 +48,6 @@ class UnQueueManager
                 jabber_public_notice($notice);
             }
             break;
-         case 'twitter':
-            if ($this->_isLocal($notice)) {
-                broadcast_twitter($notice);
-            }
-            break;
-         case 'facebook':
-            if ($this->_isLocal($notice)) {
-                require_once INSTALLDIR . '/lib/facebookutil.php';
-                return facebookBroadcastNotice($notice);
-            }
-            break;
          case 'ping':
             if ($this->_isLocal($notice)) {
                 require_once INSTALLDIR . '/lib/ping.php';
@@ -72,8 +61,13 @@ class UnQueueManager
             require_once(INSTALLDIR.'/lib/jabber.php');
             jabber_broadcast_notice($notice);
             break;
+         case 'plugin':
+            Event::handle('HandleQueuedNotice', array(&$notice));
+            break;
          default:
-            throw ServerException("UnQueueManager: Unknown queue: $type");
+            if (Event::handle('UnqueueHandleNotice', array(&$notice, $queue))) {
+                throw new ServerException("UnQueueManager: Unknown queue: $queue");
+            }
         }
     }