X-Git-Url: https://git.nmode.ca/signal-cli/blobdiff_plain/2935b96070ee687c7a17382c64e3f85730b9f706..2044a7d7a58ada7ca1e67a80012e3ffdaf86c88c:/src/main/java/org/asamk/signal/commands/VerifyCommand.java diff --git a/src/main/java/org/asamk/signal/commands/VerifyCommand.java b/src/main/java/org/asamk/signal/commands/VerifyCommand.java index 151d966a..b7fffcd2 100644 --- a/src/main/java/org/asamk/signal/commands/VerifyCommand.java +++ b/src/main/java/org/asamk/signal/commands/VerifyCommand.java @@ -16,8 +16,14 @@ import java.io.IOException; public class VerifyCommand implements RegistrationCommand { + @Override + public String getName() { + return "verify"; + } + @Override public void attachToSubparser(final Subparser subparser) { + subparser.help("Verify the number using the code received via SMS or voice."); 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)"); } @@ -38,9 +44,9 @@ public class VerifyCommand implements RegistrationCommand { } catch (KeyBackupServicePinException e) { throw new UserErrorException("Verification failed! Invalid pin, tries remaining: " + e.getTriesRemaining()); } catch (KeyBackupSystemNoDataException e) { - throw new UnexpectedErrorException("Verification failed! No KBS data."); + throw new UnexpectedErrorException("Verification failed! No KBS data.", e); } catch (IOException e) { - throw new IOErrorException("Verify error: " + e.getMessage()); + throw new IOErrorException("Verify error: " + e.getMessage(), e); } } }