From 69a3ca461910a92b9d4753f753c8f5736774cc04 Mon Sep 17 00:00:00 2001 From: nobody Date: Mon, 13 Sep 2021 01:46:50 -0700 Subject: [PATCH] more work on site actor + sys channel merge --- Zotlabs/Lib/Activity.php | 9 ++++++--- Zotlabs/Module/Channel.php | 4 +++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php index 9b11ba00a..f69feff28 100644 --- a/Zotlabs/Lib/Activity.php +++ b/Zotlabs/Lib/Activity.php @@ -1711,12 +1711,16 @@ class Activity { static function encode_site() { - $ret = []; + $sys = get_sys_channel(); + // encode the sys channel information and over-ride with site + // information + $ret = self::encode_person($sys,true,true); + $ret['type'] = 'Service'; $ret['id'] = z_root(); - + $ret['alsoKnownAs'] = z_root() . '/channel/sys'; $auto_follow = false; $ret['preferredUsername'] = System::get_site_name(); @@ -1730,7 +1734,6 @@ class Activity { $ret['generator'] = [ 'type' => 'Application', 'name' => System::get_platform_name() ]; $ret['url'] = z_root(); - $ret['inbox'] = z_root() . '/sysinbox'; $ret['manuallyApprovesFollowers'] = ((get_config('system','allowed_sites')) ? true : false); diff --git a/Zotlabs/Module/Channel.php b/Zotlabs/Module/Channel.php index 18fad8aad..7962af067 100644 --- a/Zotlabs/Module/Channel.php +++ b/Zotlabs/Module/Channel.php @@ -114,7 +114,9 @@ class Channel extends Controller { $obj->init(); } } - + if (intval($channel['channel_system'])) { + goaway(z_root()); + } as_return_and_die(Activity::encode_person($channel,true,true),$channel); }