From 6c0428b7d8bb9a0f5f4ccb68697276d99cf036d8 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Wed, 29 May 2019 22:32:24 +0200 Subject: [PATCH] Raise exception when attempting to serialize local-only statuses --- app/serializers/activitypub/note_serializer.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/serializers/activitypub/note_serializer.rb b/app/serializers/activitypub/note_serializer.rb index 67f596e78a..7225b23192 100644 --- a/app/serializers/activitypub/note_serializer.rb +++ b/app/serializers/activitypub/note_serializer.rb @@ -25,6 +25,7 @@ class ActivityPub::NoteSerializer < ActivityPub::Serializer attribute :closed, if: :poll_and_expired? def id + raise Mastodon::NotPermittedError, 'Local-only statuses should not be serialized' if object.local_only? ActivityPub::TagManager.instance.uri_for(object) end