diff options
Diffstat (limited to 'app/services/fetch_link_card_service.rb')
-rw-r--r-- | app/services/fetch_link_card_service.rb | 2 |
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 |