Class: ActivityPub::DeliveryJob

Inherits:
ApplicationJob show all
Defined in:
app/jobs/activitypub/delivery_job.rb

Constant Summary collapse

HEADERS =
{ 'Content-Type' => 'application/activity+json' }.freeze

Instance Method Summary collapse

Instance Method Details

#perform(json, source_account_id, inbox_url, options = {}) ⇒ Object



6
7
8
9
10
11
12
13
14
15
# File 'app/jobs/activitypub/delivery_job.rb', line 6

def perform(json, , inbox_url, options = {})
  @json           = json
  @source_account = ::Account.find()
  @inbox_url      = inbox_url
  @options        = options.with_indifferent_access

  perform_request
rescue => e
  raise e.class, "Delivery failed for #{inbox_url}: #{e.message}", e.backtrace[0]
end