Raise exception when attempting to serialize local-only statuses

master
Thibaut Girka 6 years ago committed by ThibG
parent 22130a0947
commit 6c0428b7d8
  1. 1
      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

Loading…
Cancel
Save