Any object (not just Notice's) can be queued

This commit is contained in:
Craig Andrews
2010-01-20 16:31:48 -05:00
parent 6a93cb2985
commit 77ea02cac3
19 changed files with 109 additions and 291 deletions

View File

@@ -23,7 +23,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
/**
* Queue handler for pushing new notices to public XMPP subscribers.
* @fixme correct this exception handling
*/
class PublicQueueHandler extends QueueHandler
{
@@ -33,15 +32,14 @@ class PublicQueueHandler extends QueueHandler
return 'public';
}
function handle_notice($notice)
function handle($notice)
{
require_once(INSTALLDIR.'/lib/jabber.php');
try {
return jabber_public_notice($notice);
} catch (XMPPHP_Exception $e) {
$this->log(LOG_ERR, "Got an XMPPHP_Exception: " . $e->getMessage());
die($e->getMessage());
return false;
}
return true;
}
}