Per PR suggestion, split name and domain, and look for emoji ID, for unreact, so remote emoji's can be unreacted
This commit is contained in:
parent
49b25c5153
commit
26646218c7
1 changed files with 4 additions and 2 deletions
|
@ -3,8 +3,10 @@
|
||||||
class UnreactService < BaseService
|
class UnreactService < BaseService
|
||||||
include Payloadable
|
include Payloadable
|
||||||
|
|
||||||
def call(account, status, name)
|
def call(account, status, emoji)
|
||||||
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!
|
||||||
|
|
Loading…
Reference in a new issue