mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 18:40:39 +00:00
Allow overriding user agent string
Not recommended, as it could lead to issues with newer Signal protocol changes. Fixes #1476
This commit is contained in:
parent
22ac3cb50f
commit
6c44662496
1 changed files with 4 additions and 1 deletions
|
@ -1,11 +1,14 @@
|
|||
package org.asamk.signal;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
public class BaseConfig {
|
||||
|
||||
public static final String PROJECT_NAME = BaseConfig.class.getPackage().getImplementationTitle();
|
||||
public static final String PROJECT_VERSION = BaseConfig.class.getPackage().getImplementationVersion();
|
||||
|
||||
static final String USER_AGENT_SIGNAL_ANDROID = "Signal-Android/6.46.0";
|
||||
static final String USER_AGENT_SIGNAL_ANDROID = Optional.ofNullable(System.getenv("SIGNAL_CLI_USER_AGENT"))
|
||||
.orElse("Signal-Android/6.46.0");
|
||||
static final String USER_AGENT_SIGNAL_CLI = PROJECT_NAME == null
|
||||
? "signal-cli"
|
||||
: PROJECT_NAME + "/" + PROJECT_VERSION;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue