Fix undefined local variable (regression from #5114) (#5210)

This commit is contained in:
Yamagishi Kazutoshi 2017-10-04 16:51:42 +09:00 committed by Eugen Rochko
parent 632178d754
commit d40c9140e8

View file

@ -43,7 +43,7 @@ class FetchAtomService < BaseService
if @response.mime_type == 'application/atom+xml' if @response.mime_type == 'application/atom+xml'
[@url, { prefetched_body: @response.to_s }, :ostatus] [@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) 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? if supported_context?(json) && json['type'] == 'Person' && json['inbox'].present?
[json['id'], { id: true }, :activitypub] [json['id'], { id: true }, :activitypub]
else else