fix unreact

This commit is contained in:
Skye 2023-02-08 21:42:43 +09:00
parent 388300482c
commit ed3c90f38c
Signed by: me
GPG key ID: 0104BC05F41B77B8

View file

@ -4,7 +4,9 @@ class UnreactService < BaseService
include Payloadable include Payloadable
def call(account, status, name) def call(account, status, name)
reaction = StatusReaction.find_by(account: account, status: status, name: name) name, domain = emoji.split('@')
custom_emoji = CustomEmoji.find_by(shortcode: name, domain: domain)
reaction = StatusReaction.find_by(account: account, status: status, name: name, custom_emoji: custom_emoji)
return if reaction.nil? return if reaction.nil?
reaction.destroy! reaction.destroy!