From 549b8f40dcf0c7af69c979eb53195150f619fb6e Mon Sep 17 00:00:00 2001 From: Shlee Date: Sat, 14 May 2022 18:30:01 +0930 Subject: [PATCH 1/5] Update StatusTransformer.php --- app/Transformer/Api/Mastodon/v1/StatusTransformer.php | 1 - 1 file changed, 1 deletion(-) diff --git a/app/Transformer/Api/Mastodon/v1/StatusTransformer.php b/app/Transformer/Api/Mastodon/v1/StatusTransformer.php index a9196249c..3467654af 100644 --- a/app/Transformer/Api/Mastodon/v1/StatusTransformer.php +++ b/app/Transformer/Api/Mastodon/v1/StatusTransformer.php @@ -38,7 +38,6 @@ class StatusTransformer extends Fractal\TransformerAbstract 'website' => null ], 'mentions' => [], - 'tags' => [], 'emojis' => [], 'card' => null, 'poll' => null, From 95f902b12be2766a4f9e122140b825f3a4a6d313 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sat, 14 May 2022 03:24:40 -0600 Subject: [PATCH 2/5] Fix json-ld attributes, fixes #3423 --- app/Transformer/ActivityPub/Verb/CreateNote.php | 8 ++++---- app/Transformer/ActivityPub/Verb/CreateQuestion.php | 10 +++++----- app/Transformer/ActivityPub/Verb/DeleteNote.php | 7 ++----- app/Transformer/ActivityPub/Verb/Note.php | 8 ++++---- app/Transformer/ActivityPub/Verb/Question.php | 10 +++++----- 5 files changed, 20 insertions(+), 23 deletions(-) diff --git a/app/Transformer/ActivityPub/Verb/CreateNote.php b/app/Transformer/ActivityPub/Verb/CreateNote.php index e7d542414..6a1a0e67b 100644 --- a/app/Transformer/ActivityPub/Verb/CreateNote.php +++ b/app/Transformer/ActivityPub/Verb/CreateNote.php @@ -60,10 +60,10 @@ class CreateNote extends Fractal\TransformerAbstract 'Hashtag' => 'as:Hashtag', 'sensitive' => 'as:sensitive', 'commentsEnabled' => 'sc:Boolean', - 'capabilities' => [ - 'announce' => ['@type' => '@id'], - 'like' => ['@type' => '@id'], - 'reply' => ['@type' => '@id'] + '@capabilities' => [ + '@announce' => '@id', + '@like' => '@id', + '@reply' => '@id', ], 'toot' => 'http://joinmastodon.org/ns#', 'Emoji' => 'toot:Emoji' diff --git a/app/Transformer/ActivityPub/Verb/CreateQuestion.php b/app/Transformer/ActivityPub/Verb/CreateQuestion.php index a1aaccdc2..1ef2efc43 100644 --- a/app/Transformer/ActivityPub/Verb/CreateQuestion.php +++ b/app/Transformer/ActivityPub/Verb/CreateQuestion.php @@ -23,11 +23,11 @@ class CreateQuestion extends Fractal\TransformerAbstract 'Hashtag' => 'as:Hashtag', 'sensitive' => 'as:sensitive', 'commentsEnabled' => 'sc:Boolean', - 'capabilities' => [ - 'announce' => ['@type' => '@id'], - 'like' => ['@type' => '@id'], - 'reply' => ['@type' => '@id'] - ] + '@capabilities' => [ + '@announce' => '@id', + '@like' => '@id', + '@reply' => '@id', + ], ] ], 'id' => $status->permalink(), diff --git a/app/Transformer/ActivityPub/Verb/DeleteNote.php b/app/Transformer/ActivityPub/Verb/DeleteNote.php index 01a2704f2..d34673aae 100644 --- a/app/Transformer/ActivityPub/Verb/DeleteNote.php +++ b/app/Transformer/ActivityPub/Verb/DeleteNote.php @@ -10,10 +10,7 @@ class DeleteNote extends Fractal\TransformerAbstract public function transform(Status $status) { return [ - '@context' => [ - 'https://www.w3.org/ns/activitystreams', - 'https://w3id.org/security/v1', - ], + '@context' => 'https://www.w3.org/ns/activitystreams', 'id' => $status->permalink('#delete'), 'type' => 'Delete', 'actor' => $status->profile->permalink(), @@ -24,4 +21,4 @@ class DeleteNote extends Fractal\TransformerAbstract ]; } -} \ No newline at end of file +} diff --git a/app/Transformer/ActivityPub/Verb/Note.php b/app/Transformer/ActivityPub/Verb/Note.php index 2c34412f5..464bf6df4 100644 --- a/app/Transformer/ActivityPub/Verb/Note.php +++ b/app/Transformer/ActivityPub/Verb/Note.php @@ -61,10 +61,10 @@ class Note extends Fractal\TransformerAbstract 'Hashtag' => 'as:Hashtag', 'sensitive' => 'as:sensitive', 'commentsEnabled' => 'sc:Boolean', - 'capabilities' => [ - 'announce' => ['@type' => '@id'], - 'like' => ['@type' => '@id'], - 'reply' => ['@type' => '@id'], + '@capabilities' => [ + '@announce' => '@id', + '@like' => '@id', + '@reply' => '@id', ], 'toot' => 'http://joinmastodon.org/ns#', 'Emoji' => 'toot:Emoji' diff --git a/app/Transformer/ActivityPub/Verb/Question.php b/app/Transformer/ActivityPub/Verb/Question.php index fd78ce2ff..32898d138 100644 --- a/app/Transformer/ActivityPub/Verb/Question.php +++ b/app/Transformer/ActivityPub/Verb/Question.php @@ -40,11 +40,11 @@ class Question extends Fractal\TransformerAbstract 'Hashtag' => 'as:Hashtag', 'sensitive' => 'as:sensitive', 'commentsEnabled' => 'sc:Boolean', - 'capabilities' => [ - 'announce' => ['@type' => '@id'], - 'like' => ['@type' => '@id'], - 'reply' => ['@type' => '@id'] - ] + '@capabilities' => [ + '@announce' => '@id', + '@like' => '@id', + '@reply' => '@id', + ], ] ], 'id' => $status->url(), From c2905835fe9b320b05861cf3f7edc9da4a2a2cd7 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sat, 14 May 2022 03:25:40 -0600 Subject: [PATCH 3/5] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bb7ca5aa2..c6024b517 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ - Add storage flags to admin dashboard diagnostics ([#3444](https://github.com/pixelfed/pixelfed/pull/3444)) - Hardcode UTC application timezone to prevent timezone issues ([b0d2c5e1](https://github.com/pixelfed/pixelfed/commit/b0d2c5e1)) - Remove arbitrary metro url redirect timeout ([84209c24](https://github.com/pixelfed/pixelfed/commit/84209c24)) +- Fix json-ld attributes, fixes #3423 ([95f902b1](https://github.com/pixelfed/pixelfed/commit/95f902b1)) ## [v0.11.3 (2022-05-09)](https://github.com/pixelfed/pixelfed/compare/v0.11.2...v0.11.3) From a160b2339b9a966ab67f0251fe3d6a92eb141241 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sun, 15 May 2022 21:25:18 -0600 Subject: [PATCH 4/5] Update exp config, enforce mastoapi compatibility by default --- config/exp.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/config/exp.php b/config/exp.php index 181c49f47..0c9f83706 100644 --- a/config/exp.php +++ b/config/exp.php @@ -32,6 +32,5 @@ return [ 'spa' => true, // Enforce Mastoapi Compatibility (alpha) - // Note: this may break 3rd party apps who use non-mastodon compliant fields - 'emc' => env('EXP_EMC', false), + 'emc' => env('EXP_EMC', true), ]; From 076ad539fb12bc1dd43f03996555fbfd83a91a17 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sun, 15 May 2022 21:25:50 -0600 Subject: [PATCH 5/5] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c6024b517..685572fea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ - Hardcode UTC application timezone to prevent timezone issues ([b0d2c5e1](https://github.com/pixelfed/pixelfed/commit/b0d2c5e1)) - Remove arbitrary metro url redirect timeout ([84209c24](https://github.com/pixelfed/pixelfed/commit/84209c24)) - Fix json-ld attributes, fixes #3423 ([95f902b1](https://github.com/pixelfed/pixelfed/commit/95f902b1)) +- Update exp config, enforce mastoapi compatibility by default ([a160b233](https://github.com/pixelfed/pixelfed/commit/a160b233)) ## [v0.11.3 (2022-05-09)](https://github.com/pixelfed/pixelfed/compare/v0.11.2...v0.11.3)