summaryrefslogtreecommitdiff
path: root/plugins/OStatus/OStatusPlugin.php
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-02-24 02:19:13 +0000
committerBrion Vibber <brion@pobox.com>2010-02-24 02:20:31 +0000
commit2e58802cc9959763f28e2f43c8e0cd0dbe7bcd8e (patch)
tree0849a577eda6ffa3491a7b80f5573ddddd0b9462 /plugins/OStatus/OStatusPlugin.php
parent868ae8e62ba2f4c320080213c6cf1d3221240c73 (diff)
OStatus: fix group delivery, send reply/group Salmon pings from background.
Diffstat (limited to 'plugins/OStatus/OStatusPlugin.php')
-rw-r--r--plugins/OStatus/OStatusPlugin.php28
1 files changed, 7 insertions, 21 deletions
diff --git a/plugins/OStatus/OStatusPlugin.php b/plugins/OStatus/OStatusPlugin.php
index 35f952935..9376c048d 100644
--- a/plugins/OStatus/OStatusPlugin.php
+++ b/plugins/OStatus/OStatusPlugin.php
@@ -78,11 +78,16 @@ class OStatusPlugin extends Plugin
*/
function onEndInitializeQueueManager(QueueManager $qm)
{
+ // Prepare outgoing distributions after notice save.
+ $qm->connect('ostatus', 'OStatusQueueHandler');
+
// Outgoing from our internal PuSH hub
$qm->connect('hubverify', 'HubVerifyQueueHandler');
- $qm->connect('hubdistrib', 'HubDistribQueueHandler');
$qm->connect('hubout', 'HubOutQueueHandler');
+ // Outgoing Salmon replies (when we don't need a return value)
+ $qm->connect('salmonout', 'SalmonOutQueueHandler');
+
// Incoming from a foreign PuSH hub
$qm->connect('pushinput', 'PushInputQueueHandler');
return true;
@@ -93,7 +98,7 @@ class OStatusPlugin extends Plugin
*/
function onStartEnqueueNotice($notice, &$transports)
{
- $transports[] = 'hubdistrib';
+ $transports[] = 'ostatus';
return true;
}
@@ -199,25 +204,6 @@ class OStatusPlugin extends Plugin
function onEndNoticeSave($notice)
{
- $mentioned = $notice->getReplies();
-
- foreach ($mentioned as $profile_id) {
-
- $oprofile = Ostatus_profile::staticGet('profile_id', $profile_id);
-
- if (!empty($oprofile) && !empty($oprofile->salmonuri)) {
-
- common_log(LOG_INFO, "Sending notice '{$notice->uri}' to remote profile '{$oprofile->uri}'.");
-
- // FIXME: this needs to go out in a queue handler
-
- $xml = '<?xml version="1.0" encoding="UTF-8" ?' . '>';
- $xml .= $notice->asAtomEntry(true, true);
-
- $salmon = new Salmon();
- $salmon->post($oprofile->salmonuri, $xml);
- }
- }
}
/**