attribute :closed, if: :poll_and_expired?
def id
- raise Mastodon::NotPermittedError, 'Local-only statuses should not be serialized' if object.local_only?
+ raise Mastodon::NotPermittedError, 'Local-only statuses should not be serialized' if object.local_only? && !instance_options[:allow_local_only]
ActivityPub::TagManager.instance.uri_for(object)
end
ActiveModelSerializers::SerializableResource.new(
object,
serializer: serializer,
- adapter: ActivityPub::Adapter
+ adapter: ActivityPub::Adapter,
+ allow_local_only: true,
).as_json
end