Class: ActivityPub::UndoVoteDistributionJob

Inherits:
ApplicationJob
  • Object
show all
Defined in:
app/jobs/activitypub/undo_vote_distribution_job.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.call(vote) ⇒ Object



4
5
6
7
8
9
10
11
# File 'app/jobs/activitypub/undo_vote_distribution_job.rb', line 4

def self.call(vote)
  ActivityPub::UndoVoteDistributionJob.perform_later(
    vote.id,
    vote.voteable_type,
    vote.voteable_id,
    vote.
  )
end

Instance Method Details

#perform(vote_id, voteable_type, voteable_id, account_id) ⇒ Object



13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'app/jobs/activitypub/undo_vote_distribution_job.rb', line 13

def perform(vote_id, voteable_type, voteable_id, )
  @vote_id = vote_id
  @voteable = voteable_type.constantize.find(voteable_id)
  @account = Account.find()

  inboxes.each do |inbox_url|
    ActivityPub::DeliveryJob.perform_later(
      signed_payload, .id, inbox_url
    )
  end

rescue ActiveRecord::RecordNotFound
  true
end