]>
cat aescling's git repositories - mastodon.git/blob - app/workers/feed_insert_worker.rb
1 # frozen_string_literal: true
4 include Sidekiq
::Worker
6 def perform(status_id
, id
, type
= :home)
8 @status = Status
.find(status_id
)
12 @follower = Account
.find(id
)
15 @follower = @list.account
19 rescue ActiveRecord
::RecordNotFound
26 return if feed_filtered
?
29 perform_notify
if notify
?
35 FeedManager
.instance
.filter
?(:home, @status, @follower)
37 FeedManager
.instance
.filter
?(:list, @status, @list)
42 return false if @type !
= :home || @status.reblog
? || (@status.reply
? && @status.in_reply_to_account_id !
= @status.account_id
)
44 Follow
.find_by(account
: @follower, target_account
: @status.account
)&.notify
?
50 FeedManager
.instance
.push_to_home(@follower, @status)
52 FeedManager
.instance
.push_to_list(@list, @status)
57 NotifyService
.new
.call(@follower, :status, @status)
This page took 0.081181 seconds and 4 git commands to generate.