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 | |
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')
-rw-r--r-- | plugins/OStatus/lib/hubconfqueuehandler.php (renamed from plugins/OStatus/lib/hubverifyqueuehandler.php) | 4 | ||||
-rw-r--r-- | plugins/OStatus/lib/ostatusqueuehandler.php | 22 | ||||
-rw-r--r-- | plugins/OStatus/lib/pushinqueuehandler.php (renamed from plugins/OStatus/lib/pushinputqueuehandler.php) | 4 | ||||
-rw-r--r-- | plugins/OStatus/lib/salmonqueuehandler.php (renamed from plugins/OStatus/lib/salmonoutqueuehandler.php) | 4 |
4 files changed, 11 insertions, 23 deletions
diff --git a/plugins/OStatus/lib/hubverifyqueuehandler.php b/plugins/OStatus/lib/hubconfqueuehandler.php index 7ce9e1431..c8e0b72fe 100644 --- a/plugins/OStatus/lib/hubverifyqueuehandler.php +++ b/plugins/OStatus/lib/hubconfqueuehandler.php @@ -22,11 +22,11 @@ * @package Hub * @author Brion Vibber <brion@status.net> */ -class HubVerifyQueueHandler extends QueueHandler +class HubConfQueueHandler extends QueueHandler { function transport() { - return 'hubverify'; + return 'hubconf'; } function handle($data) 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); } } diff --git a/plugins/OStatus/lib/pushinputqueuehandler.php b/plugins/OStatus/lib/pushinqueuehandler.php index cbd9139b5..a90f52df2 100644 --- a/plugins/OStatus/lib/pushinputqueuehandler.php +++ b/plugins/OStatus/lib/pushinqueuehandler.php @@ -23,11 +23,11 @@ * @author Brion Vibber <brion@status.net> */ -class PushInputQueueHandler extends QueueHandler +class PushInQueueHandler extends QueueHandler { function transport() { - return 'pushinput'; + return 'pushin'; } function handle($data) diff --git a/plugins/OStatus/lib/salmonoutqueuehandler.php b/plugins/OStatus/lib/salmonqueuehandler.php index 536ff94af..aa97018dc 100644 --- a/plugins/OStatus/lib/salmonoutqueuehandler.php +++ b/plugins/OStatus/lib/salmonqueuehandler.php @@ -22,11 +22,11 @@ * @package OStatusPlugin * @author Brion Vibber <brion@status.net> */ -class SalmonOutQueueHandler extends QueueHandler +class SalmonQueueHandler extends QueueHandler { function transport() { - return 'salmonout'; + return 'salmon'; } function handle($data) |