move xrd and hostmeta out of the OStatus plugin and into core
add event for setting up hostmeta, and use them in the OStatus plugin
This commit is contained in:
committed by
Evan Prodromou
parent
c65f199486
commit
3f3b38766f
@@ -52,8 +52,6 @@ class OStatusPlugin extends Plugin
|
||||
function onRouterInitialized($m)
|
||||
{
|
||||
// Discovery actions
|
||||
$m->connect('.well-known/host-meta',
|
||||
array('action' => 'hostmeta'));
|
||||
$m->connect('main/xrd',
|
||||
array('action' => 'userxrd'));
|
||||
$m->connect('main/ownerxrd',
|
||||
@@ -1011,4 +1009,12 @@ class OStatusPlugin extends Plugin
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function onStartHostMetaLinks(&$links) {
|
||||
$url = common_local_url('userxrd');
|
||||
$url.= '?uri={uri}';
|
||||
$links[] = array('rel' => Discovery::LRDD_REL,
|
||||
'template' => $url,
|
||||
'title' => array('Resource Descriptor'));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user