diff --git a/app/services/concerns/account_scope.rb b/app/services/concerns/account_scope.rb index 00bb9a3960..45a11c911e 100644 --- a/app/services/concerns/account_scope.rb +++ b/app/services/concerns/account_scope.rb @@ -17,7 +17,7 @@ module AccountScope end def scope_account_local_followers(account) - account.followers_for_local_distribution.select(:id).reorder(nil) + account.followers_for_local_distribution.or(Account.where(id: account.id)).select(:id).reorder(nil) end def scope_status_mentioned(status) diff --git a/app/workers/delivery_emoji_reaction_worker.rb b/app/workers/delivery_emoji_reaction_worker.rb index 5ec9dd4fba..46d1c7b339 100644 --- a/app/workers/delivery_emoji_reaction_worker.rb +++ b/app/workers/delivery_emoji_reaction_worker.rb @@ -6,20 +6,13 @@ class DeliveryEmojiReactionWorker include Lockable include AccountScope - def perform(payload_json, status_id, my_account_id = nil) - redis.publish("timeline:#{my_account_id}", payload_json) if my_account_id.present? && !Account.find(my_account_id)&.user&.setting_stop_emoji_reaction_streaming - + def perform(payload_json, status_id, _my_account_id = nil) status = Status.find(status_id.to_i) if status.present? scope_status(status).includes(:user).find_each do |account| redis.publish("timeline:#{account.id}", payload_json) if !account.user&.setting_stop_emoji_reaction_streaming && redis.exists?("subscribed:timeline:#{account.id}") end - - if [:public, :unlisted, :public_unlisted, :login].exclude?(status.visibility.to_sym) && status.account_id != my_account_id && - redis.exists?("subscribed:timeline:#{status.account_id}") && !status.account.user&.setting_stop_emoji_reaction_streaming - redis.publish("timeline:#{status.account_id}", payload_json) - end end true