mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-22 17:46:22 +00:00
16 lines
383 B
Ruby
16 lines
383 B
Ruby
# 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
|