]> cat aescling's git repositories - mastodon.git/commitdiff
Skip link-back check if body is nil (#9107)
authorabcang <abcang1015@gmail.com>
Fri, 26 Oct 2018 01:31:23 +0000 (10:31 +0900)
committerEugen Rochko <eugen@zeonfederated.com>
Fri, 26 Oct 2018 01:31:23 +0000 (03:31 +0200)
app/services/verify_link_service.rb

index 3453b54c5f7fdec5173a3dee251a7c40c2f69515..9f56249c70440a1c7585b4e8dbe84836c4f04391 100644 (file)
@@ -25,7 +25,7 @@ class VerifyLinkService < BaseService
   end
 
   def link_back_present?
-    return false if @body.empty?
+    return false if @body.blank?
 
     links = Nokogiri::HTML(@body).xpath('//a[contains(concat(" ", normalize-space(@rel), " "), " me ")]|//link[contains(concat(" ", normalize-space(@rel), " "), " me ")]')