mirror of
https://github.com/AsamK/signal-cli.git
synced 2026-08-26 05:36:53 +00:00
Check if account is already registered before attempting verification
This commit is contained in:
parent
895740755d
commit
b41ebfe6b8
@ -129,6 +129,10 @@ public class RegistrationManagerImpl implements RegistrationManager {
|
||||
public void verifyAccount(
|
||||
String verificationCode, String pin
|
||||
) throws IOException, PinLockedException, IncorrectPinException {
|
||||
if (account.isRegistered()) {
|
||||
throw new IOException("Account is already registered");
|
||||
}
|
||||
|
||||
if (account.getPniIdentityKeyPair() == null) {
|
||||
account.setPniIdentityKeyPair(KeyUtils.generateIdentityKeyPair());
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user