diff --git a/app/lib/activitypub/activity/like.rb b/app/lib/activitypub/activity/like.rb index 86d70e0d70822a..f6c8769fee4cae 100644 --- a/app/lib/activitypub/activity/like.rb +++ b/app/lib/activitypub/activity/like.rb @@ -15,11 +15,12 @@ def perform Trends.statuses.register(original_status) end - # Misskey delivers reactions as likes with the emoji in _misskey_reaction - # see https://misskey-hub.net/ns.html#misskey-reaction for details + # 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 + # See https://misskey-hub.net/ns.html#misskey-reaction for details def maybe_process_misskey_reaction original_status = status_from_uri(object_uri) - name = @json['_misskey_reaction'] + name = @json['content'] || @json['_misskey_reaction'] return false if name.nil? if /^:.*:$/.match?(name) diff --git a/app/lib/activitypub/activity/undo.rb b/app/lib/activitypub/activity/undo.rb index 5efcfdc99f2d49..5f9f1bbecbfaf1 100644 --- a/app/lib/activitypub/activity/undo.rb +++ b/app/lib/activitypub/activity/undo.rb @@ -110,7 +110,7 @@ def undo_like if @account.favourited?(status) favourite = status.favourites.where(account: @account).first favourite&.destroy - elsif @object['_misskey_reaction'].present? + elsif @object['content'].present? || @object['_misskey_reaction'].present? undo_emoji_react else delete_later!(object_uri)