From f54dc524d1b0f42db9439ead8158dc8a2f17071d Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Mon, 9 Mar 2020 12:13:43 -0500 Subject: handle possible `nil` --- app/lib/activitypub/activity.rb | 1 + 1 file changed, 1 insertion(+) 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 -- cgit