about summary refs log tree commit diff
path: root/app/services/fetch_link_card_service.rb
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2020-09-01 17:36:30 +0200
committerGitHub <noreply@github.com>2020-09-01 17:36:30 +0200
commitd967251fdc3826ad27d30e55258cfa4cdfd7c871 (patch)
tree91926ccaedf470bfef058cc7156f9f362d46186a /app/services/fetch_link_card_service.rb
parentd95dd3883e0c7d1626f5e3b88d24af2627a641e2 (diff)
parent787a629b8f1df4cce53a9de7f3aa668cc9ef632f (diff)
Merge pull request #1417 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/services/fetch_link_card_service.rb')
-rw-r--r--app/services/fetch_link_card_service.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/services/fetch_link_card_service.rb b/app/services/fetch_link_card_service.rb
index beab449b2..7efa31054 100644
--- a/app/services/fetch_link_card_service.rb
+++ b/app/services/fetch_link_card_service.rb
@@ -78,6 +78,7 @@ class FetchLinkCardService < BaseService
     uri.host.blank? || TagManager.instance.local_url?(uri.to_s) || !%w(http https).include?(uri.scheme)
   end
 
+  # rubocop:disable Naming/MethodParameterName
   def mention_link?(a)
     @status.mentions.any? do |mention|
       a['href'] == ActivityPub::TagManager.instance.url_for(mention.account)
@@ -88,6 +89,7 @@ class FetchLinkCardService < BaseService
     # Avoid links for hashtags and mentions (microformats)
     a['rel']&.include?('tag') || a['class']&.match?(/u-url|h-card/) || mention_link?(a)
   end
+  # rubocop:enable Naming/MethodParameterName
 
   def attempt_oembed
     service         = FetchOEmbedService.new