0
0
Fork 0

Decode IDNA in PreviewCard (#2781)

This commit is contained in:
Yamagishi Kazutoshi 2017-05-04 22:52:08 +09:00 committed by Eugen Rochko
parent e37e84d210
commit e95983f5df
5 changed files with 23 additions and 7 deletions

View file

@ -11,6 +11,7 @@ class FetchLinkCardService < BaseService
return if url.nil?
url = Addressable::URI.parse(url).normalize.to_s
card = PreviewCard.where(status: status).first_or_initialize(status: status, url: url)
attempt_opengraph(card, url) unless attempt_oembed(card, url)
end