From 6e1ad5a03f1656f2a484d549ed223078b94c58c6 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