]> nmode's Git Repositories - signal-cli/commitdiff
Add version to user agent string
authorAsamK <asamk@gmx.de>
Tue, 22 Sep 2015 12:44:11 +0000 (14:44 +0200)
committerAsamK <asamk@gmx.de>
Tue, 22 Sep 2015 12:44:11 +0000 (14:44 +0200)
src/main/java/cli/Manager.java

index fef7c81d8fcbca67fa7c7cf5d6c201e375f23290..846e0dc9de63ba36cd6a373350081d6f12859289 100644 (file)
@@ -51,7 +51,9 @@ class Manager {
     private final static String URL = "https://textsecure-service.whispersystems.org";
     private final static TrustStore TRUST_STORE = new WhisperTrustStore();
 
-    private final static String USER_AGENT = "textsecure-cli";
+    public final static String PROJECT_NAME =  Manager.class.getPackage().getImplementationTitle();
+    public final static String PROJECT_VERSION =  Manager.class.getPackage().getImplementationVersion();
+    private final static String USER_AGENT = PROJECT_NAME + " " + PROJECT_VERSION;
 
     private final static String settingsPath = System.getProperty("user.home") + "/.config/textsecure";
     private final static String dataPath = settingsPath + "/data";