services: link fetcher: do not fetch links for quotes
parent
6be7cbb0bc
commit
78e8693388
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue