mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 18:40:39 +00:00
parent
4485188789
commit
c3e1d4fc75
3 changed files with 15 additions and 5 deletions
|
@ -298,7 +298,7 @@ public class Manager implements Closeable {
|
|||
return account.isRegistered();
|
||||
}
|
||||
|
||||
public void register(boolean voiceVerification) throws IOException {
|
||||
public void register(boolean voiceVerification, String captcha) throws IOException {
|
||||
account.setPassword(KeyUtils.createPassword());
|
||||
|
||||
// Resetting UUID, because registering doesn't work otherwise
|
||||
|
@ -306,9 +306,9 @@ public class Manager implements Closeable {
|
|||
accountManager = createSignalServiceAccountManager();
|
||||
|
||||
if (voiceVerification) {
|
||||
accountManager.requestVoiceVerificationCode(Locale.getDefault(), Optional.absent(), Optional.absent());
|
||||
accountManager.requestVoiceVerificationCode(Locale.getDefault(), Optional.fromNullable(captcha), Optional.absent());
|
||||
} else {
|
||||
accountManager.requestSmsVerificationCode(false, Optional.absent(), Optional.absent());
|
||||
accountManager.requestSmsVerificationCode(false, Optional.fromNullable(captcha), Optional.absent());
|
||||
}
|
||||
|
||||
account.setRegistered(false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue