Browse Source

Fix first return value of FetchLinkCardService.html method (#15630)

closed-social-v3
Takeshi Umeda 3 years ago
committed by GitHub
parent
commit
7f1c56954b
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      app/services/fetch_link_card_service.rb

+ 2
- 2
app/services/fetch_link_card_service.rb View File

@ -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|
if res.code == 200 && res.mime_type == 'text/html'
@html = res.body_with_limit
@html_charset = res.charset
@html = res.body_with_limit
else
@html = nil
@html_charset = nil
@html = nil
end
end
end

Loading…
Cancel
Save