diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php index db8fa9033..bc1bba802 100644 --- a/Zotlabs/Lib/Activity.php +++ b/Zotlabs/Lib/Activity.php @@ -49,7 +49,7 @@ class Activity { if(! $r) return []; - return self::encode_person($r[0]); + return self::encode_person($r[0],false); } diff --git a/Zotlabs/Module/Cover_photo.php b/Zotlabs/Module/Cover_photo.php index 05fa81dda..530327561 100644 --- a/Zotlabs/Module/Cover_photo.php +++ b/Zotlabs/Module/Cover_photo.php @@ -1,6 +1,9 @@ ACTIVITY_OBJ_PHOTO, + 'type' => ACTIVITY_OBJ_NOTE, 'published' => datetime_convert('UTC','UTC',$photo['created'],ATOM_TIME), 'updated' => datetime_convert('UTC','UTC',$photo['edited'],ATOM_TIME), 'id' => $arr['mid'], 'url' => [ 'type' => 'Link', 'mediaType' => $photo['mimetype'], 'href' => z_root() . '/photo/' . $photo['resource_id'] . '-7' ], 'source' => [ 'content' => $arr['body'], 'mediaType' => 'text/bbcode' ], 'content' => bbcode($arr['body']), - 'actor' => \Zotlabs\Lib\Activity::encode_person($channel), + 'actor' => Activity::encode_person($channel,false), ]; - $acl = new \Zotlabs\Access\AccessList($channel); + $acl = new AccessList($channel); $x = $acl->get(); $arr['allow_cid'] = $x['allow_cid']; diff --git a/Zotlabs/Module/Follow.php b/Zotlabs/Module/Follow.php index 820030b2f..b334b8829 100644 --- a/Zotlabs/Module/Follow.php +++ b/Zotlabs/Module/Follow.php @@ -5,6 +5,7 @@ use Zotlabs\Lib\Libsync; use Zotlabs\Lib\ActivityStreams; use Zotlabs\Lib\Activity; use Zotlabs\Web\HTTPSignatures; +use Zotlabs\Lib\LDSignatures; require_once('include/follow.php'); @@ -17,7 +18,8 @@ class Follow extends \Zotlabs\Web\Controller { return; } - if(ActivityStreams::is_as_request() && argc() == 2) { $abook_id = intval(argv(1)); + if(ActivityStreams::is_as_request() && argc() == 2) { + $abook_id = intval(argv(1)); if(! $abook_id) return; @@ -32,7 +34,7 @@ class Follow extends \Zotlabs\Web\Controller { if(! $chan) http_status_exit(404, 'Not found'); - $actor = Activity::encode_person($chan); + $actor = Activity::encode_person($chan,true,true); if(! $actor) http_status_exit(404, 'Not found'); @@ -50,7 +52,7 @@ class Follow extends \Zotlabs\Web\Controller { $headers = []; $headers['Content-Type'] = 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"' ; - $x['signature'] = \Zotlabs\Lib\LDSignatures::sign($x,$chan); + $x['signature'] = LDSignatures::sign($x,$chan); $ret = json_encode($x, JSON_UNESCAPED_SLASHES); $headers['Digest'] = HTTPSig::generate_digest_header($ret); $h = HTTPSig::create_sig($headers,$chan['channel_prvkey'],channel_url($chan)); diff --git a/include/event.php b/include/event.php index 5daccadcf..7958d420f 100644 --- a/include/event.php +++ b/include/event.php @@ -6,6 +6,7 @@ use Sabre\VObject; use Zotlabs\Lib\Libsync; +use Zotlabs\Lib\Activity; require_once('include/bbcode.php'); @@ -1038,7 +1039,7 @@ function event_store_item($arr, $event) { 'location' => [ 'type' => 'Place', 'content' => $arr['location'] ], 'content' => format_event_html($arr), 'source' => [ 'content' => format_event_bbcode($arr), 'mediaType' => 'text/bbcode' ], - 'actor' => \Zotlabs\Lib\Activity::encode_person($r[0]), + 'actor' => Activity::encode_person($r[0],false), ]; if(! $arr['nofinish']) { @@ -1183,7 +1184,7 @@ function event_store_item($arr, $event) { 'location' => [ 'type' => 'Place', 'content' => bbcode($arr['location']) ], 'content' => format_event_html($arr), 'source' => [ 'content' => format_event_bbcode($arr), 'mediaType' => 'text/bbcode' ], - 'actor' => \Zotlabs\Lib\Activity::encode_person($z), + 'actor' => Activity::encode_person($z,false), ]; if(! $arr['nofinish']) { diff --git a/include/items.php b/include/items.php index d606fe24f..a7184156d 100755 --- a/include/items.php +++ b/include/items.php @@ -4543,7 +4543,7 @@ function send_profile_photo_activity($channel,$photo,$profile) { $arr['item_thread_top'] = 1; $arr['item_origin'] = 1; $arr['item_wall'] = 1; - $arr['obj_type'] = ACTIVITY_OBJ_PHOTO; + $arr['obj_type'] = ACTIVITY_OBJ_NOTE; $arr['verb'] = ACTIVITY_UPDATE; $arr['mid'] = item_message_id(); @@ -4562,14 +4562,14 @@ function send_profile_photo_activity($channel,$photo,$profile) { $arr['obj'] = [ - 'type' => ACTIVITY_OBJ_PHOTO, + 'type' => ACTIVITY_OBJ_NOTE, 'published' => datetime_convert('UTC','UTC',$photo['created'],ATOM_TIME), 'updated' => datetime_convert('UTC','UTC',$photo['edited'],ATOM_TIME), 'id' => $arr['mid'], 'url' => [ 'type' => 'Link', 'mediaType' => $photo['mimetype'], 'href' => z_root() . '/photo/profile/l/' . $channel['channel_id'] ], 'source' => [ 'content' => $arr['body'], 'mediaType' => 'text/bbcode' ], 'content' => bbcode($arr['body']), - 'actor' => \Zotlabs\Lib\Activity::encode_person($channel), + 'actor' => Activity::encode_person($channel,false), ]; $acl = new AccessList($channel);