1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <?php
- defined('GNUSOCIAL') || die();
- class ImQueueHandler extends QueueHandler
- {
- function __construct($plugin)
- {
- $this->plugin = $plugin;
- }
-
- 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;
- }
- }
|