mirror of https://github.com/tootsuite/mastodon
Fix pushing hashtag-followed posts to feeds of inactive users
parent
68c7782940
commit
2435a38ef2
|
@ -21,4 +21,6 @@ class TagFollow < ApplicationRecord
|
|||
accepts_nested_attributes_for :tag
|
||||
|
||||
rate_limit by: :account, family: :follows
|
||||
|
||||
scope :for_local_distribution, -> { joins(account: :user).merge(User.signed_in_recently) }
|
||||
end
|
||||
|
|
|
@ -103,7 +103,7 @@ class FanOutOnWriteService < BaseService
|
|||
end
|
||||
|
||||
def deliver_to_hashtag_followers!
|
||||
TagFollow.where(tag_id: @status.tags.map(&:id)).select(:id, :account_id).reorder(nil).find_in_batches do |follows|
|
||||
TagFollow.for_local_distribution.where(tag_id: @status.tags.map(&:id)).select(:id, :account_id).reorder(nil).find_in_batches do |follows|
|
||||
FeedInsertWorker.push_bulk(follows) do |follow|
|
||||
[@status.id, follow.account_id, 'tags', { 'update' => update? }]
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue