From e671d77e8f45b0fc531ed7bcd3be824fa12efafa Mon Sep 17 00:00:00 2001 From: Yamagishi Kazutoshi Date: Wed, 4 Oct 2017 16:51:42 +0900 Subject: [PATCH] Fix undefined local variable (regression from #5114) (#5210) --- app/services/fetch_atom_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/fetch_atom_service.rb b/app/services/fetch_atom_service.rb index bcf516bc3b..7c54714a22 100644 --- a/app/services/fetch_atom_service.rb +++ b/app/services/fetch_atom_service.rb @@ -43,7 +43,7 @@ class FetchAtomService < BaseService if @response.mime_type == 'application/atom+xml' [@url, { prefetched_body: @response.to_s }, :ostatus] elsif ['application/activity+json', 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"'].include?(@response.mime_type) - json = body_to_json(body) + json = body_to_json(@response.to_s) if supported_context?(json) && json['type'] == 'Person' && json['inbox'].present? [json['id'], { id: true }, :activitypub] else