2
0

Enable Rubocop Style/StringConcatenation defaults (#23792)

This commit is contained in:
Nick Schonning
2023-02-21 19:54:36 -05:00
committed by GitHub
parent 7ecf783dd3
commit 0cfdd1a401
14 changed files with 25 additions and 44 deletions

View File

@@ -45,7 +45,7 @@ class FetchLinkCardService < BaseService
def html
return @html if defined?(@html)
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|
# We follow redirects, and ideally we want to save the preview card for
# the destination URL and not any link shortener in-between, so here
# we set the URL to the one of the last response in the redirect chain