From ab250030619b2b470d62ce60f462d9b43f5bbab2 Mon Sep 17 00:00:00 2001 From: AsamK Date: Tue, 22 Sep 2015 14:44:11 +0200 Subject: [PATCH] Add version to user agent string --- src/main/java/cli/Manager.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/cli/Manager.java b/src/main/java/cli/Manager.java index fef7c81d..846e0dc9 100644 --- a/src/main/java/cli/Manager.java +++ b/src/main/java/cli/Manager.java @@ -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";