Commit 7e2de851 authored by Zot's avatar Zot

map federation protocols for zotinfo

parent 47d531b2
......@@ -47,7 +47,8 @@ function diaspora_load() {
'author_is_pmable' => 'diaspora_author_is_pmable',
'can_comment_on_post' => 'diaspora_can_comment_on_post',
'queue_deliver' => 'diaspora_queue_deliver',
'webfinger' => 'diaspora_webfinger'
'webfinger' => 'diaspora_webfinger',
'channel_protocols' => 'diaspora_channel_protocols'
]);
diaspora_init_relay();
......@@ -120,6 +121,14 @@ function diaspora_well_known(&$b) {
}
}
function diaspora_channel_protocols(&$b) {
if(intval(get_pconfig($b['channel_id'],'system','diaspora_allowed')))
$b['protocols'][] = 'diaspora';
}
function diaspora_personal_xrd(&$b) {
if(! intval(get_pconfig($b['user']['channel_id'],'system','diaspora_allowed')))
......
......@@ -50,7 +50,7 @@ function gnusoc_load() {
register_hook('cron_daily','addon/gnusoc/gnusoc.php','gnusoc_cron_daily');
register_hook('can_comment_on_post','addon/gnusoc/gnusoc.php','gnusoc_can_comment_on_post');
register_hook('connection_remove','addon/gnusoc/gnusoc.php','gnusoc_connection_remove');
register_hook('channel_protocols','addon/gnusoc/gnusoc.php','gnusoc_channel_protocols');
// register_hook('notifier_hub', 'addon/gnusoc/gnusoc.php', 'gnusoc_process_outbound');
// register_hook('permissions_update', 'addon/gnusoc/gnusoc.php', 'gnusoc_permissions_update');
......@@ -79,6 +79,7 @@ function gnusoc_unload() {
unregister_hook('cron_daily','addon/gnusoc/gnusoc.php','gnusoc_cron_daily');
unregister_hook('can_comment_on_post','addon/gnusoc/gnusoc.php','gnusoc_can_comment_on_post');
unregister_hook('connection_remove','addon/gnusoc/gnusoc.php','gnusoc_connection_remove');
unregister_hook('channel_protocols','addon/gnusoc/gnusoc.php','gnusoc_channel_protocols');
}
......@@ -92,6 +93,12 @@ function gnusoc_load_module(&$a, &$b) {
}
}
function gnusoc_channel_protocols($a,&$b) {
if(intval(get_pconfig($b['channel_id'],'system','gnusoc_allowed')))
$b['protocols'][] = 'ostatus';
}
function gnusoc_webfinger(&$a,&$b) {
......
......@@ -37,7 +37,8 @@ function pubcrawl_load() {
'channel_links' => 'pubcrawl_channel_links',
'personal_xrd' => 'pubcrawl_personal_xrd',
'queue_deliver' => 'pubcrawl_queue_deliver',
'import_author' => 'pubcrawl_import_author'
'import_author' => 'pubcrawl_import_author',
'channel_protocols' => 'pubcrawl_channel_protocols'
]);
}
......@@ -46,6 +47,14 @@ function pubcrawl_unload() {
}
function pubcrawl_channel_protocols(&$b) {
if(intval(get_pconfig($b['channel_id'],'system','activitypub_allowed')))
$b['protocols'][] = 'activitypub';
}
function pubcrawl_follow_allow(&$b) {
if($b['xchan']['xchan_network'] !== 'activitypub')
......
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