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.
This commit is contained in:
Brion Vibber
2010-02-10 22:58:39 +00:00
parent 162868afdb
commit 4ae760cb62
4 changed files with 67 additions and 20 deletions

View File

@@ -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',