]> cat aescling's git repositories - mastodon.git/commitdiff
Add Mastodon version to user agent (#2253)
authorik-fib <ik11235@users.noreply.github.com>
Fri, 21 Apr 2017 15:26:23 +0000 (00:26 +0900)
committerEugen <eugen@zeonfederated.com>
Fri, 21 Apr 2017 15:26:23 +0000 (17:26 +0200)
app/services/fetch_link_card_service.rb

index 5ab781bfc3740627a3972374f201cbe77ff56e65..f24ebb82b812cb8323c6c14399e9e052ad70c0f7 100644 (file)
@@ -1,7 +1,7 @@
 # frozen_string_literal: true
 
 class FetchLinkCardService < BaseService
-  USER_AGENT = "#{HTTP::Request::USER_AGENT} (Mastodon; +http://#{Rails.configuration.x.local_domain}/)"
+  USER_AGENT = "#{HTTP::Request::USER_AGENT} (Mastodon/#{Mastodon::VERSION}; +http://#{Rails.configuration.x.local_domain}/)"
 
   def call(status)
     # Get first http/https URL that isn't local