From 933bf7c59cb2a5b5b61b130f3e765bf4d8d1d849 Mon Sep 17 00:00:00 2001 From: KMY Date: Wed, 13 Sep 2023 19:54:43 +0900 Subject: [PATCH] Fix emoji reaction is not shown when domain blocking --- app/models/status.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/status.rb b/app/models/status.rb index 1795b72ec5..c6c05e95e7 100644 --- a/app/models/status.rb +++ b/app/models/status.rb @@ -361,7 +361,7 @@ class Status < ApplicationRecord emoji_reaction['account_ids'] -= account.excluded_from_timeline_account_ids.map(&:to_s) accounts = Account.where(id: emoji_reaction['account_ids'], silenced_at: nil, suspended_at: nil) - accounts = accounts.where.not(domain: account.excluded_from_timeline_domains) if account.excluded_from_timeline_domains.size.positive? + accounts = accounts.where('domain IS NULL OR domain NOT IN (?)', account.excluded_from_timeline_domains) if account.excluded_from_timeline_domains.size.positive? emoji_reaction['account_ids'] = accounts.pluck(:id).map(&:to_s) emoji_reaction['count'] = emoji_reaction['account_ids'].size