Fix duplicate @context attribute in user export (#30653)

This commit is contained in:
Claire 2024-06-12 09:28:28 +02:00
parent 520b2086af
commit 19ed22dc58
2 changed files with 10 additions and 4 deletions

View file

@ -19,8 +19,8 @@ class BackupService < BaseService
def build_outbox_json!(file)
skeleton = serialize(collection_presenter, ActivityPub::CollectionSerializer)
skeleton[:@context] = full_context
skeleton[:orderedItems] = ['!PLACEHOLDER!']
skeleton['@context'] = full_context
skeleton['orderedItems'] = ['!PLACEHOLDER!']
skeleton = Oj.dump(skeleton)
prepend, append = skeleton.split('"!PLACEHOLDER!"')
add_comma = false