mirror of
https://framagit.org/tykayn/mastodon.git
synced 2023-08-25 08:33:12 +02:00
Fix first return value of FetchLinkCardService.html method (#15630)
This commit is contained in:
parent
4f05a43f8f
commit
7f1c56954b
@ -47,11 +47,11 @@ class FetchLinkCardService < BaseService
|
|||||||
|
|
||||||
Request.new(:get, @url).add_headers('Accept' => 'text/html', 'User-Agent' => Mastodon::Version.user_agent + ' Bot').perform do |res|
|
Request.new(:get, @url).add_headers('Accept' => 'text/html', 'User-Agent' => Mastodon::Version.user_agent + ' Bot').perform do |res|
|
||||||
if res.code == 200 && res.mime_type == 'text/html'
|
if res.code == 200 && res.mime_type == 'text/html'
|
||||||
@html = res.body_with_limit
|
|
||||||
@html_charset = res.charset
|
@html_charset = res.charset
|
||||||
|
@html = res.body_with_limit
|
||||||
else
|
else
|
||||||
@html = nil
|
|
||||||
@html_charset = nil
|
@html_charset = nil
|
||||||
|
@html = nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user