services: link fetcher: do not fetch links for quotes

pull/36/head
Ariadne Conill 2022-12-25 02:00:29 +00:00
parent 6be7cbb0bc
commit 78e8693388
1 changed files with 1 additions and 1 deletions

View File

@ -74,7 +74,7 @@ class FetchLinkCardService < BaseService
@status.text.scan(URL_PATTERN).map { |array| Addressable::URI.parse(array[1]).normalize }
else
document = Nokogiri::HTML(@status.text)
links = document.css('a')
links = document.css(':not(.quote-inline) > a')
links.filter_map { |a| Addressable::URI.parse(a['href']) unless skip_link?(a) }.filter_map(&:normalize)
end