diff options
author | Brion Vibber <brion@pobox.com> | 2010-02-24 20:36:36 +0000 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-02-24 20:36:36 +0000 |
commit | c36bdc1ba535dc3e2dc9098dbe40735b1955d96d (patch) | |
tree | 8ff364c7042cf8fc4e24327982a9ddae9e20031c /plugins/OStatus/lib/ostatusqueuehandler.php | |
parent | 07214f1370547fcc64db34ce8c8a84ec70e0d5bd (diff) |
- break OMB profile update pings to a background queue
- add event hooks to profile update pings
- send Salmon pings with custom update-profile event to OStatus subscribees and groups (subscribers will see it on your next post)
- fix OStatus queues with overlong transport names, should work on DB queues now
- Ostatus_profile::notifyActivity() and ::notifyDeferred() now can take XML, Notice, or Activity for convenience
Diffstat (limited to 'plugins/OStatus/lib/ostatusqueuehandler.php')
-rw-r--r-- | plugins/OStatus/lib/ostatusqueuehandler.php | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/plugins/OStatus/lib/ostatusqueuehandler.php b/plugins/OStatus/lib/ostatusqueuehandler.php index c1e50bffa..0da85600f 100644 --- a/plugins/OStatus/lib/ostatusqueuehandler.php +++ b/plugins/OStatus/lib/ostatusqueuehandler.php @@ -83,23 +83,11 @@ class OStatusQueueHandler extends QueueHandler function pingReply($oprofile) { if ($this->user) { - if (!empty($oprofile->salmonuri)) { - // For local posts, send a Salmon ping to the mentioned - // remote user or group. - // @fixme as an optimization we can skip this if the - // remote profile is subscribed to the author. - - common_log(LOG_INFO, "Prepping to send notice '{$this->notice->uri}' to remote profile '{$oprofile->uri}'."); - - $xml = '<?xml version="1.0" encoding="UTF-8" ?' . '>'; - $xml .= $this->notice->asAtomEntry(true, true); - - $data = array('salmonuri' => $oprofile->salmonuri, - 'entry' => $xml); - - $qm = QueueManager::get(); - $qm->enqueue($data, 'salmonout'); - } + // For local posts, send a Salmon ping to the mentioned + // remote user or group. + // @fixme as an optimization we can skip this if the + // remote profile is subscribed to the author. + $oprofile->notifyDeferred($this->notice); } } |