about summary refs log tree commit diff
path: root/lib
diff options
context:
space:
mode:
authorJenkins <jenkins@jenkins.ninjawedding.org>2018-05-18 00:17:23 +0000
committerJenkins <jenkins@jenkins.ninjawedding.org>2018-05-18 00:17:23 +0000
commit4c0770d6c8dac8177b8891a6fb97ccf440100fc2 (patch)
tree9d71c9189635be02b4ef344c18f3b86b7a936c02 /lib
parent2636a23092306bdb07250add02d2851476d58bc2 (diff)
parent919eef309820a421d6f5886b8ae811d3924cea97 (diff)
Merge remote-tracking branch 'tootsuite/master' into glitchsoc/master
Diffstat (limited to 'lib')
-rw-r--r--lib/mastodon/version.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/mastodon/version.rb b/lib/mastodon/version.rb
index 849b564e7..60f133085 100644
--- a/lib/mastodon/version.rb
+++ b/lib/mastodon/version.rb
@@ -48,5 +48,9 @@ module Mastodon
         source_base_url
       end
     end
+
+    def user_agent
+      @user_agent ||= "#{HTTP::Request::USER_AGENT} (Mastodon/#{Version}; +http#{Rails.configuration.x.use_https ? 's' : ''}://#{Rails.configuration.x.web_domain}/)"
+    end
   end
 end