about summary refs log tree commit diff
path: root/app/services
diff options
context:
space:
mode:
authorunarist <m.unarist@gmail.com>2017-08-23 03:00:49 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-08-22 20:00:49 +0200
commit5927b43c0fc74e66cd3a882b565ea70236559c02 (patch)
tree7cad900e51efe5dea5ec701e2963d77b5d9a79c4 /app/services
parent871c0d251a6d27c4591785ae446738a8d6c553ab (diff)
Ignore empty response in ActivityPub::FetchRemoteStatusService (#4661)
* Ignore empty response in ActivityPub::FetchRemoteStatusService

This fixes `NoMethodError: undefined method `[]' for nil:NilClass` error.

* Check json.nil? in JsonLdHelper#supported_context?
Diffstat (limited to 'app/services')
-rw-r--r--app/services/fetch_atom_service.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/services/fetch_atom_service.rb b/app/services/fetch_atom_service.rb
index 3cf39e006..afda50ae4 100644
--- a/app/services/fetch_atom_service.rb
+++ b/app/services/fetch_atom_service.rb
@@ -82,7 +82,7 @@ class FetchAtomService < BaseService
 
   def supported_activity?(body)
     json = body_to_json(body)
-    return false if json.nil? || !supported_context?(json)
+    return false unless supported_context?(json)
     json['type'] == 'Person' ? json['inbox'].present? : true
   end
 end