]> nmode's Git Repositories - signal-cli/blobdiff - src/main/java/org/asamk/signal/commands/RemoveDeviceCommand.java
Make deviceId an int
[signal-cli] / src / main / java / org / asamk / signal / commands / RemoveDeviceCommand.java
index f2012e774668579d10ad5d52219ffb104264f62c..24b3f81e8079ea2643f78ca636dff35c5db460c8 100644 (file)
@@ -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(long.class)
+                .type(int.class)
                 .required(true)
                 .help("Specify the device you want to remove. Use listDevices to see the deviceIds.");
     }
@@ -31,7 +31,7 @@ public class RemoveDeviceCommand implements JsonRpcLocalCommand {
             final Namespace ns, final Manager m, final OutputWriter outputWriter
     ) throws CommandException {
         try {
-            final var deviceId = ns.getLong("device-id");
+            final var deviceId = ns.getInt("device-id");
             m.removeLinkedDevices(deviceId);
         } catch (IOException e) {
             throw new IOErrorException("Error while removing device: " + e.getMessage(), e);