about summary refs log tree commit diff
path: root/app/lib
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2020-03-09 12:13:43 -0500
committermultiple creatures <dev@multiple-creature.party>2020-03-09 12:13:43 -0500
commitf54dc524d1b0f42db9439ead8158dc8a2f17071d (patch)
tree2726134fff65ac93e1c6788d694703472e85e76a /app/lib
parent5a626b60e91ba26ce62fe6d5a868d6179c8fa0e9 (diff)
handle possible `nil`
Diffstat (limited to 'app/lib')
-rw-r--r--app/lib/activitypub/activity.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/lib/activitypub/activity.rb b/app/lib/activitypub/activity.rb
index 9366cc984..7f39ef3f3 100644
--- a/app/lib/activitypub/activity.rb
+++ b/app/lib/activitypub/activity.rb
@@ -207,6 +207,7 @@ class ActivityPub::Activity
 
   def blocked?
     uri = object_uri.start_with?('http') ? object_uri : @object['url']
+    return true if object_uri.nil?
     domain = uri.scan(/[\w\-]+\.[\w\-]+(?:\.[\w\-]+)*/).first
     domain.blank? ? true : DomainBlock.suspend?(domain)
   end