Fix remove emoji reactions bulk
This commit is contained in:
parent
5fc29d03dd
commit
fb1c2abc7e
@ -9,10 +9,11 @@ class UnEmojiReactService < BaseService
|
|||||||
@account = Account.find(account_id)
|
@account = Account.find(account_id)
|
||||||
@status = Status.find(status_id)
|
@status = Status.find(status_id)
|
||||||
|
|
||||||
|
p '==================================== DEBUG'
|
||||||
|
p emoji_reaction
|
||||||
|
|
||||||
if emoji_reaction
|
if emoji_reaction
|
||||||
p '================================ DEBUG2 G'
|
emoji_reaction.destroy!
|
||||||
emoji_reaction.destroy
|
|
||||||
p '================================ DEBUG2 H'
|
|
||||||
create_notification(emoji_reaction) if !@account.local? && @account.activitypub?
|
create_notification(emoji_reaction) if !@account.local? && @account.activitypub?
|
||||||
notify_to_followers(emoji_reaction) if @account.local?
|
notify_to_followers(emoji_reaction) if @account.local?
|
||||||
write_stream(emoji_reaction)
|
write_stream(emoji_reaction)
|
||||||
@ -25,8 +26,8 @@ class UnEmojiReactService < BaseService
|
|||||||
private
|
private
|
||||||
|
|
||||||
def bulk(account, status)
|
def bulk(account, status)
|
||||||
EmojiReaction.where(account: account).where(status: status).tap do |emoji_reaction|
|
EmojiReaction.where(account: account).where(status: status).each do |emoji_reaction|
|
||||||
call(account, status, emoji_reaction)
|
call(account.id, status.id, emoji_reaction)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user