diff options
author | Brion Vibber <brion@pobox.com> | 2010-02-10 22:58:39 +0000 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-02-10 22:58:39 +0000 |
commit | 4ae760cb62657e68b6b2313e64d2bb59fe264df4 (patch) | |
tree | f9a562537de1cba671ab7106e2ec21e25f3d891f /plugins/OStatus/OStatusPlugin.php | |
parent | 162868afdb1181a3d6e973a3de9d0abbb5e1c168 (diff) |
OStatus PuSH fixes:
* HMAC now calculated correctly - confirmed interop with Google's public hub
* Can optionally use an external PuSH hub, set URL in $config['ostatus']['hub']
(may have issues in replication environment, and will ping the hub for every
update rather than just those with subscribers) Internal hub will still function
when this is set, but won't be advertised. Warning: setting this, then turning
it off later will break subscriptions as that hub will no longer receive pings.
Diffstat (limited to 'plugins/OStatus/OStatusPlugin.php')
-rw-r--r-- | plugins/OStatus/OStatusPlugin.php | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/plugins/OStatus/OStatusPlugin.php b/plugins/OStatus/OStatusPlugin.php index 62ecaf631..4b9b4d2c3 100644 --- a/plugins/OStatus/OStatusPlugin.php +++ b/plugins/OStatus/OStatusPlugin.php @@ -114,10 +114,15 @@ class OStatusPlugin extends Plugin if ($action instanceof ApiTimelineUserAction || $action instanceof ApiTimelineGroupAction) { $id = $action->arg('id'); if (strval(intval($id)) === strval($id)) { - // Canonical form of id in URL? - // Updates will be handled for our internal PuSH hub. + // Canonical form of id in URL? These are used for OStatus syndication. + + $hub = common_config('ostatus', 'hub'); + if (empty($hub)) { + // Updates will be handled through our internal PuSH hub. + $hub = common_local_url('pushhub'); + } $action->element('link', array('rel' => 'hub', - 'href' => common_local_url('pushhub'))); + 'href' => $hub)); // Also, we'll add in the salmon link $action->element('link', array('rel' => 'salmon', |