. */ defined('GNUSOCIAL') || die(); /** * Common superclass for all IM sending queue handlers. */ class ImQueueHandler extends QueueHandler { function __construct($plugin) { $this->plugin = $plugin; } /** * Handle a notice * @param Notice $notice * @return boolean success */ function handle($notice) : bool { if (!($notice instanceof Notice)) { common_log(LOG_ERR, "Got a bogus notice, not broadcasting"); return true; } $this->plugin->broadcastNotice($notice); if ($notice->isLocal()) { $this->plugin->publicNotice($notice); } return true; } }