mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 10:30:38 +00:00
Show information when requesting voice verification without SMS verification
Fixes #1373
This commit is contained in:
parent
f1e3b5c9cc
commit
59c1f4eed2
10 changed files with 39 additions and 8 deletions
|
@ -15,6 +15,7 @@ import org.asamk.signal.manager.RegistrationManager;
|
|||
import org.asamk.signal.manager.api.CaptchaRequiredException;
|
||||
import org.asamk.signal.manager.api.NonNormalizedPhoneNumberException;
|
||||
import org.asamk.signal.manager.api.RateLimitException;
|
||||
import org.asamk.signal.manager.api.VerificationMethoNotAvailableException;
|
||||
import org.asamk.signal.output.JsonWriter;
|
||||
import org.asamk.signal.util.CommandUtil;
|
||||
|
||||
|
@ -79,6 +80,12 @@ public class RegisterCommand implements RegistrationCommand, JsonRpcRegistration
|
|||
} catch (IOException e) {
|
||||
throw new IOErrorException("Failed to register: %s (%s)".formatted(e.getMessage(),
|
||||
e.getClass().getSimpleName()), e);
|
||||
} catch (VerificationMethoNotAvailableException e) {
|
||||
throw new UserErrorException("Failed to register: " + e.getMessage() + (
|
||||
voiceVerification
|
||||
? ": Before requesting voice verification you need to request SMS verification and wait a minute."
|
||||
: ""
|
||||
), e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue