Commit b67fba33 authored by Zot's avatar Zot

add activitypub self link to webfinger - even though it may rarely if ever get used from there

parent ef16cdae
......@@ -20,6 +20,7 @@ require_once('addon/pubcrawl/HTTPSig.php');
function pubcrawl_load() {
Zotlabs\Extend\Hook::register_array('addon/pubcrawl/pubcrawl.php', [
'module_loaded' => 'pubcrawl_load_module',
'webfinger' => 'pubcrawl_webfinger',
'channel_mod_init' => 'pubcrawl_channel_mod_init',
'profile_mod_init' => 'pubcrawl_profile_mod_init',
'follow_mod_init' => 'pubcrawl_follow_mod_init',
......@@ -52,6 +53,15 @@ function pubcrawl_follow_allow(&$b) {
}
function pubcrawl_webfinger(&$b) {
$b['result']['links'][] = [
'rel' => 'self',
'type' => 'application/activity+json',
'href' => z_root() . '/channel/' . $b['channel']['channel_address']
];
}
function pubcrawl_discover_channel_webfinger(&$b) {
$url = $b['address'];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment