Debug like.rb, undo.rb
This commit is contained in:
parent
f7e5adfa70
commit
0feabcf9c3
2 changed files with 5 additions and 6 deletions
|
@ -38,8 +38,6 @@ class ActivityPub::Activity::Like < ActivityPub::Activity
|
|||
end
|
||||
end
|
||||
|
||||
return if @account.reacted?(@original_status, shortcode, emoji)
|
||||
|
||||
return if EmojiReaction.where(account: @account, status: @original_status).count >= BaseController::DEFAULT_EMOJI_REACTION_LIMIT
|
||||
|
||||
EmojiReaction.find_by(account: @account, status: @original_status)&.destroy
|
||||
|
|
|
@ -125,15 +125,16 @@ class ActivityPub::Activity::Undo < ActivityPub::Activity
|
|||
emoji = CustomEmoji.find_by(shortcode: shortcode, domain: @account.domain)
|
||||
end
|
||||
|
||||
if @account.reacted?(@original_status, shortcode, emoji)
|
||||
@original_status.emoji_reactions.where(account: @account, name: shortcode, custom_emoji: emoji).first&.destroy
|
||||
emoji_reaction = @original_status.emoji_reactions.where(account: @account, name: shortcode, custom_emoji: emoji).first&
|
||||
|
||||
if emoji_reaction
|
||||
emoji_reaction.destroy
|
||||
write_stream(emoji_reaction)
|
||||
|
||||
if @original_status.account.local?
|
||||
forward_for_undo_emoji_reaction
|
||||
relay_for_undo_emoji_reaction
|
||||
end
|
||||
else
|
||||
delete_later!(object_uri)
|
||||
end
|
||||
else
|
||||
undo_like_original
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue