Fix remove emoji reactions bulk
This commit is contained in:
parent
1786562e00
commit
2351489523
1 changed files with 6 additions and 2 deletions
|
@ -9,7 +9,11 @@ class UnEmojiReactService < BaseService
|
|||
@account = Account.find(account_id)
|
||||
@status = Status.find(status_id)
|
||||
|
||||
p '==================================== DEBUG'
|
||||
p emoji_reaction
|
||||
|
||||
if emoji_reaction
|
||||
emoji_reaction.destroy!
|
||||
create_notification(emoji_reaction) if !@account.local? && @account.activitypub?
|
||||
notify_to_followers(emoji_reaction) if @account.local?
|
||||
write_stream(emoji_reaction)
|
||||
|
@ -22,8 +26,8 @@ class UnEmojiReactService < BaseService
|
|||
private
|
||||
|
||||
def bulk(account, status)
|
||||
EmojiReaction.where(account: account).where(status: status).tap do |emoji_reaction|
|
||||
call(account, status, emoji_reaction)
|
||||
EmojiReaction.where(account: account).where(status: status).each do |emoji_reaction|
|
||||
call(account.id, status.id, emoji_reaction)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue