]> nmode's Git Repositories - signal-cli/blobdiff - src/main/java/org/asamk/signal/commands/VerifyCommand.java
Move storage package to manager
[signal-cli] / src / main / java / org / asamk / signal / commands / VerifyCommand.java
index 9d99c0d209c4e086de48c996696b760f098fa4b3..b6ad100bf0b4a83f0e0aaa65dd7a9c05291fd0ad 100644 (file)
@@ -12,18 +12,12 @@ public class VerifyCommand implements LocalCommand {
 
     @Override
     public void attachToSubparser(final Subparser subparser) {
-        subparser.addArgument("verificationCode")
-                .help("The verification code you received via sms or voice call.");
-        subparser.addArgument("-p", "--pin")
-                .help("The registration lock PIN, that was set by the user (Optional)");
+        subparser.addArgument("verificationCode").help("The verification code you received via sms or voice call.");
+        subparser.addArgument("-p", "--pin").help("The registration lock PIN, that was set by the user (Optional)");
     }
 
     @Override
     public int handleCommand(final Namespace ns, final Manager m) {
-        if (!m.userHasKeys()) {
-            System.err.println("User has no keys, first call register.");
-            return 1;
-        }
         if (m.isRegistered()) {
             System.err.println("User registration is already verified");
             return 1;
@@ -34,7 +28,8 @@ public class VerifyCommand implements LocalCommand {
             m.verifyAccount(verificationCode, pin);
             return 0;
         } catch (LockedException e) {
-            System.err.println("Verification failed! This number is locked with a pin. Hours remaining until reset: " + (e.getTimeRemaining() / 1000 / 60 / 60));
+            System.err.println("Verification failed! This number is locked with a pin. Hours remaining until reset: "
+                    + (e.getTimeRemaining() / 1000 / 60 / 60));
             System.err.println("Use '--pin PIN_CODE' to specify the registration lock PIN");
             return 3;
         } catch (IOException e) {