From c717c34bd799ebe4d1b9f51b67e829a0acdf7ed0 Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Sun, 16 Feb 2020 01:43:05 -0600 Subject: make sure hidden posts cannot be serialized to apub objects --- app/serializers/activitypub/note_serializer.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/serializers/activitypub') diff --git a/app/serializers/activitypub/note_serializer.rb b/app/serializers/activitypub/note_serializer.rb index 3749fcd22..3492069cc 100644 --- a/app/serializers/activitypub/note_serializer.rb +++ b/app/serializers/activitypub/note_serializer.rb @@ -35,6 +35,8 @@ class ActivityPub::NoteSerializer < ActivityPub::Serializer def id raise Mastodon::NotPermittedError, 'Local-only statuses should not be serialized' if object.local_only? + raise Mastodon::NotPermittedError, 'Hidden statuses should not be serialized' if object.hidden + ActivityPub::TagManager.instance.uri_for(object) end -- cgit