diff options
author | multiple creatures <dev@multiple-creature.party> | 2020-03-09 12:13:43 -0500 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2020-03-09 12:13:43 -0500 |
commit | f54dc524d1b0f42db9439ead8158dc8a2f17071d (patch) | |
tree | 2726134fff65ac93e1c6788d694703472e85e76a /app/lib/activitypub/activity.rb | |
parent | 5a626b60e91ba26ce62fe6d5a868d6179c8fa0e9 (diff) |
handle possible `nil`
Diffstat (limited to 'app/lib/activitypub/activity.rb')
-rw-r--r-- | app/lib/activitypub/activity.rb | 1 |
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 |