Fix emoji reactions with the same name but different domains being misidentified as me
This commit is contained in:
parent
60c13a4cb0
commit
82b1d12c99
1 changed files with 1 additions and 1 deletions
|
@ -326,7 +326,7 @@ class Status < ApplicationRecord
|
|||
if account.nil?
|
||||
scope.select('name, custom_emoji_id, count(*) as count, false as me')
|
||||
else
|
||||
scope.select("name, custom_emoji_id, count(*) as count, exists(select 1 from emoji_reactions r where r.account_id = #{account.id} and r.status_id = emoji_reactions.status_id and r.name = emoji_reactions.name) as me")
|
||||
scope.select("name, custom_emoji_id, count(*) as count, exists(select 1 from emoji_reactions r where r.account_id = #{account.id} and r.status_id = emoji_reactions.status_id and r.name = emoji_reactions.name and r.custom_emoji_id = emoji_reactions.custom_emoji_id) as me")
|
||||
end
|
||||
end
|
||||
ActiveRecord::Associations::Preloader.new.preload(records, :custom_emoji)
|
||||
|
|
Loading…
Reference in a new issue