mirror of
https://git.bsd.gay/fef/nyastodon.git
synced 2024-12-27 22:23:43 +01:00
parent
c94966891a
commit
e5f4d83e60
2 changed files with 3 additions and 2 deletions
|
@ -25,7 +25,7 @@ class ActivityPub::NoteSerializer < ActivityPub::Serializer
|
||||||
attribute :closed, if: :poll_and_expired?
|
attribute :closed, if: :poll_and_expired?
|
||||||
|
|
||||||
def id
|
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)
|
ActivityPub::TagManager.instance.uri_for(object)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -149,7 +149,8 @@ class BackupService < BaseService
|
||||||
ActiveModelSerializers::SerializableResource.new(
|
ActiveModelSerializers::SerializableResource.new(
|
||||||
object,
|
object,
|
||||||
serializer: serializer,
|
serializer: serializer,
|
||||||
adapter: ActivityPub::Adapter
|
adapter: ActivityPub::Adapter,
|
||||||
|
allow_local_only: true,
|
||||||
).as_json
|
).as_json
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue