X-Git-Url: https://git.nmode.ca/signal-cli/blobdiff_plain/af292d8f0ea897ea13470489d51c40acca50fc3e..cd29144e81701698092f3334bee0c99c0f77f202:/src/main/java/org/asamk/signal/commands/RemoveDeviceCommand.java diff --git a/src/main/java/org/asamk/signal/commands/RemoveDeviceCommand.java b/src/main/java/org/asamk/signal/commands/RemoveDeviceCommand.java index 1f47e2b3..4fcad79d 100644 --- a/src/main/java/org/asamk/signal/commands/RemoveDeviceCommand.java +++ b/src/main/java/org/asamk/signal/commands/RemoveDeviceCommand.java @@ -21,7 +21,7 @@ public class RemoveDeviceCommand implements JsonRpcLocalCommand { public void attachToSubparser(final Subparser subparser) { subparser.help("Remove a linked device."); subparser.addArgument("-d", "--device-id", "--deviceId") - .type(int.class) + .type(long.class) .required(true) .help("Specify the device you want to remove. Use listDevices to see the deviceIds."); } @@ -31,10 +31,10 @@ public class RemoveDeviceCommand implements JsonRpcLocalCommand { final Namespace ns, final Manager m, final OutputWriter outputWriter ) throws CommandException { try { - int deviceId = ns.getInt("device-id"); + final var deviceId = ns.getLong("device-id"); m.removeLinkedDevices(deviceId); } catch (IOException e) { - throw new IOErrorException("Error while removing device: " + e.getMessage()); + throw new IOErrorException("Error while removing device: " + e.getMessage(), e); } } }