Add signature to exported status (#12649)
This commit is contained in:
parent
8a347f4937
commit
68070e82cc
|
@ -3,6 +3,8 @@
|
||||||
require 'rubygems/package'
|
require 'rubygems/package'
|
||||||
|
|
||||||
class BackupService < BaseService
|
class BackupService < BaseService
|
||||||
|
include Payloadable
|
||||||
|
|
||||||
attr_reader :account, :backup, :collection
|
attr_reader :account, :backup, :collection
|
||||||
|
|
||||||
def call(backup)
|
def call(backup)
|
||||||
|
@ -20,7 +22,7 @@ class BackupService < BaseService
|
||||||
|
|
||||||
account.statuses.with_includes.reorder(nil).find_in_batches do |statuses|
|
account.statuses.with_includes.reorder(nil).find_in_batches do |statuses|
|
||||||
statuses.each do |status|
|
statuses.each do |status|
|
||||||
item = serialize(status, ActivityPub::ActivitySerializer)
|
item = serialize_payload(status, ActivityPub::ActivitySerializer, signer: @account)
|
||||||
item.delete(:'@context')
|
item.delete(:'@context')
|
||||||
|
|
||||||
unless item[:type] == 'Announce' || item[:object][:attachment].blank?
|
unless item[:type] == 'Announce' || item[:object][:attachment].blank?
|
||||||
|
|
Loading…
Reference in New Issue