Fix: #172 他のサーバーからの相乗り絵文字削除が反映されない

This commit is contained in:
KMY 2023-10-23 09:11:45 +09:00 committed by KMY(雪あすか)
parent 1de49649fa
commit 7c5b99df61
3 changed files with 96 additions and 4 deletions

View file

@ -247,8 +247,16 @@ module AccountInteractions
status.proper.favourites.where(account: self).exists?
end
def emoji_reactioned?(status)
status.proper.emoji_reactions.where(account: self).exists?
def emoji_reacted?(status, shortcode = nil, domain = nil, domain_force = false) # rubocop:disable Style/OptionalBooleanParameter
if shortcode.present?
if domain.present? || domain_force
status.proper.emoji_reactions.joins(:custom_emoji).where(account: self, name: shortcode, custom_emoji: { domain: domain }).exists?
else
status.proper.emoji_reactions.where(account: self, name: shortcode).exists?
end
else
status.proper.emoji_reactions.where(account: self).exists?
end
end
def bookmarked?(status)