about summary refs log tree commit diff
path: root/app/serializers/activitypub
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2019-05-29 22:32:24 +0200
committerThibG <thib@sitedethib.com>2019-05-30 09:04:12 +0200
commit6c0428b7d8bb9a0f5f4ccb68697276d99cf036d8 (patch)
treef42c76d2c3b6c37210c5e7e6aceed6ed6657aedd /app/serializers/activitypub
parent22130a09471129939a655c306e468d271930d085 (diff)
Raise exception when attempting to serialize local-only statuses
Diffstat (limited to 'app/serializers/activitypub')
-rw-r--r--app/serializers/activitypub/note_serializer.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/serializers/activitypub/note_serializer.rb b/app/serializers/activitypub/note_serializer.rb
index 67f596e78..7225b2319 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