System.exit(3);
}
break;
+ case "removeDevice":
+ if (dBusConn != null) {
+ System.err.println("removeDevice is not yet implemented via dbus");
+ System.exit(1);
+ }
+ if (!m.isRegistered()) {
+ System.err.println("User is not registered.");
+ System.exit(1);
+ }
+ try {
+ int deviceId = ns.getInt("deviceId");
+ m.removeLinkedDevices(deviceId);
+ } catch (IOException e) {
+ e.printStackTrace();
+ System.exit(3);
+ }
+ break;
case "send":
if (dBusConn == null && !m.isRegistered()) {
System.err.println("User is not registered.");
.help("Show package version.")
.action(Arguments.version());
parser.addArgument("--config")
- .help("Set the path, where to store the config (Default: $HOME/.config/signal-cli).");
+ .help("Set the path, where to store the config (Default: $HOME/.config/signal).");
MutuallyExclusiveGroup mut = parser.addMutuallyExclusiveGroup();
mut.addArgument("-u", "--username")
Subparser parserDevices = subparsers.addParser("listDevices");
+ Subparser parserRemoveDevice = subparsers.addParser("removeDevice");
+ parserRemoveDevice.addArgument("-d", "--deviceId")
+ .type(int.class)
+ .required(true)
+ .help("Specify the device you want to remove. Use listDevices to see the deviceIds.");
+
Subparser parserRegister = subparsers.addParser("register");
parserRegister.addArgument("-v", "--voice")
.help("The verification should be done over voice, not sms.")