diff options
author | multiple creatures <dev@multiple-creature.party> | 2020-02-16 01:43:05 -0600 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2020-02-16 01:43:05 -0600 |
commit | c717c34bd799ebe4d1b9f51b67e829a0acdf7ed0 (patch) | |
tree | fa3ba754a980e8a8dba304991f75c589c1c567d0 /app/serializers | |
parent | a416fc1f17e7abd967c177721c07a5e56fdedac4 (diff) |
make sure hidden posts cannot be serialized to apub objects
Diffstat (limited to 'app/serializers')
-rw-r--r-- | app/serializers/activitypub/note_serializer.rb | 2 |
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 |