From 6252340804bee66736e49de4bdc08755510f1c70 Mon Sep 17 00:00:00 2001 From: Mario Date: Sat, 6 Jan 2024 10:03:44 +0000 Subject: add Bookmark and Category to ap schema and bump ap schema version --- Zotlabs/Module/Apschema.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Zotlabs/Module/Apschema.php') diff --git a/Zotlabs/Module/Apschema.php b/Zotlabs/Module/Apschema.php index e8d45c522..8d57fb777 100644 --- a/Zotlabs/Module/Apschema.php +++ b/Zotlabs/Module/Apschema.php @@ -52,7 +52,9 @@ class Apschema extends \Zotlabs\Web\Controller { 'diaspora' => 'https://diasporafoundation.org/ns/', 'guid' => 'diaspora:guid', - 'Hashtag' => 'as:Hashtag' + 'Hashtag' => 'as:Hashtag', + 'Bookmark' => 'zot:Bookmark', + 'Category' => 'zot:Category' ] ]; -- cgit v1.2.3 From 58593d7da6a893e681b7c64fdf21a02c93dfa0d0 Mon Sep 17 00:00:00 2001 From: Mario Date: Wed, 10 Jan 2024 13:33:57 +0000 Subject: prepare outbound fep-8b32 (object integrity) but do not enable yet since the additional context seems to break ldsig for some reason, introduce Activity::build_packet() and Activity::ap_context() to reduce code duplication, implement fep-2c59 (webfinger) and some cleanup --- Zotlabs/Module/Apschema.php | 65 +++------------------------------------------ 1 file changed, 4 insertions(+), 61 deletions(-) (limited to 'Zotlabs/Module/Apschema.php') diff --git a/Zotlabs/Module/Apschema.php b/Zotlabs/Module/Apschema.php index 8d57fb777..2ec11086a 100644 --- a/Zotlabs/Module/Apschema.php +++ b/Zotlabs/Module/Apschema.php @@ -2,70 +2,13 @@ namespace Zotlabs\Module; +use Zotlabs\Web\Controller; +use Zotlabs\Lib\Activity; -class Apschema extends \Zotlabs\Web\Controller { - +class Apschema extends Controller { function init() { - - $base = z_root(); - - $arr = [ - '@context' => [ - 'zot' => z_root() . '/apschema#', - 'id' => '@id', - 'type' => '@type', - 'commentPolicy' => 'zot:commentPolicy', - 'meData' => 'zot:meData', - 'meDataType' => 'zot:meDataType', - 'meEncoding' => 'zot:meEncoding', - 'meAlgorithm' => 'zot:meAlgorithm', - 'meCreator' => 'zot:meCreator', - 'meSignatureValue' => 'zot:meSignatureValue', - 'locationAddress' => 'zot:locationAddress', - 'locationPrimary' => 'zot:locationPrimary', - 'locationDeleted' => 'zot:locationDeleted', - 'nomadicLocation' => 'zot:nomadicLocation', - 'nomadicHubs' => 'zot:nomadicHubs', - 'emojiReaction' => 'zot:emojiReaction', - 'expires' => 'zot:expires', - 'directMessage' => 'zot:directMessage', - 'schema' => 'http://schema.org#', - 'PropertyValue' => 'schema:PropertyValue', - 'value' => 'schema:value', - - 'manuallyApprovesFollowers' => 'as:manuallyApprovesFollowers', - - - 'magicEnv' => [ - '@id' => 'zot:magicEnv', - '@type' => '@id' - ], - - 'nomadicLocations' => [ - '@id' => 'zot:nomadicLocations', - '@type' => '@id' - ], - - 'ostatus' => 'http://ostatus.org#', - 'conversation' => 'ostatus:conversation', - - 'diaspora' => 'https://diasporafoundation.org/ns/', - 'guid' => 'diaspora:guid', - - 'Hashtag' => 'as:Hashtag', - 'Bookmark' => 'zot:Bookmark', - 'Category' => 'zot:Category' - - ] - ]; - header('Content-Type: application/ld+json'); - echo json_encode($arr,JSON_UNESCAPED_SLASHES); + echo json_encode(Activity::ap_context(), JSON_UNESCAPED_SLASHES); killme(); - } - - - - } -- cgit v1.2.3