X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Funqueuemanager.php;h=72dbc4eede6807034334f2243af32e7fa471452f;hb=9ef05030fe623f18c64f9d24da1ebff04cf6cb62;hp=34c7188b2d6eba6013439595216601f29a094316;hpb=4b2aa517501037e86e4a3c3bad3f363dcf8a26c6;p=quix0rs-gnu-social.git diff --git a/lib/unqueuemanager.php b/lib/unqueuemanager.php index 34c7188b2d..72dbc4eede 100644 --- a/lib/unqueuemanager.php +++ b/lib/unqueuemanager.php @@ -1,6 +1,6 @@ . * * @category QueueManager - * @package Laconica - * @author Evan Prodromou - * @author Sarven Capadisli - * @copyright 2009 Control Yourself, Inc. + * @package StatusNet + * @author Evan Prodromou + * @author Sarven Capadisli + * @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 @@ -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,14 +61,19 @@ 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"); + } } } function _isLocal($notice) { - return ($notice->is_local == NOTICE_LOCAL_PUBLIC || - $notice->is_local == NOTICE_LOCAL_NONPUBLIC); + return ($notice->is_local == Notice::LOCAL_PUBLIC || + $notice->is_local == Notice::LOCAL_NONPUBLIC); } } \ No newline at end of file