about summary refs log tree commit diff
path: root/app/serializers
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2020-02-16 01:43:05 -0600
committermultiple creatures <dev@multiple-creature.party>2020-02-16 01:43:05 -0600
commitc717c34bd799ebe4d1b9f51b67e829a0acdf7ed0 (patch)
treefa3ba754a980e8a8dba304991f75c589c1c567d0 /app/serializers
parenta416fc1f17e7abd967c177721c07a5e56fdedac4 (diff)
make sure hidden posts cannot be serialized to apub objects
Diffstat (limited to 'app/serializers')
-rw-r--r--app/serializers/activitypub/note_serializer.rb2
1 files changed, 2 insertions, 0 deletions
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