5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-24 15:46:23 +00:00
panel/app/jobs/activity_pub/inbox_job.rb

17 lines
383 B
Ruby
Raw Permalink Normal View History

# frozen_string_literal: true
class ActivityPub
class InboxJob < ApplicationJob
self.priority = 10
# @param :site [Site]
# @param :activity [String]
# @param :action [Symbol]
def perform(site:, activity:, action:)
response = site.social_inbox.inbox.public_send(action, id: activity)
raise response.body unless response.success?
end
end
end