Skip to content

Commit

Permalink
Make name of like content parser function more general
Browse files Browse the repository at this point in the history
  • Loading branch information
TheEssem committed Dec 2, 2024
1 parent bb01f80 commit 73a0da4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/lib/activitypub/activity/like.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ def perform
original_status = status_from_uri(object_uri)
return if original_status.nil? || !original_status.account.local? || delete_arrived_first?(@json['id'])

return if maybe_process_misskey_reaction
return if maybe_process_embedded_reaction

return if @account.favourited?(original_status)

Expand All @@ -15,10 +15,10 @@ def perform
Trends.statuses.register(original_status)
end

# Misskey delivers reactions as likes with the emoji in _misskey_reaction and content
# Versions of Misskey before 12.1.0 only specify emojis in _misskey_reaction, so we check both
# Some servers deliver reactions as likes with the emoji in content
# Versions of Misskey before 12.1.0 specify emojis in _misskey_reaction instead, so we check both
# See https://misskey-hub.net/ns.html#misskey-reaction for details
def maybe_process_misskey_reaction
def maybe_process_embedded_reaction
original_status = status_from_uri(object_uri)
name = @json['content'] || @json['_misskey_reaction']
return false if name.nil?
Expand Down

0 comments on commit 73a0da4

Please sign in to comment.