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:
@@ -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',
|
||||
|
Reference in New Issue
Block a user