X-Git-Url: https://git.nmode.ca/signal-cli/blobdiff_plain/17ff7531d493266bca9c97fdf61290ead7262227..39687f9d87774a824be4765d80a635475f8215f1:/src/main/java/org/asamk/signal/Main.java diff --git a/src/main/java/org/asamk/signal/Main.java b/src/main/java/org/asamk/signal/Main.java index a6d36d0f..b3664f24 100644 --- a/src/main/java/org/asamk/signal/Main.java +++ b/src/main/java/org/asamk/signal/Main.java @@ -224,6 +224,23 @@ public class Main { 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."); @@ -487,7 +504,7 @@ public class Main { .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") @@ -516,6 +533,12 @@ public class Main { 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.")