]> nmode's Git Repositories - signal-cli/blobdiff - lib/src/main/java/org/asamk/signal/manager/helper/AccountHelper.java
Update libsignal-service
[signal-cli] / lib / src / main / java / org / asamk / signal / manager / helper / AccountHelper.java
index 7d40f99c41114386265e6914052e1cf388f7cee8..1d5849c37fc62cb46a013ea2070426857de6ccbb 100644 (file)
@@ -105,7 +105,7 @@ public class AccountHelper {
             if (!account.isPrimaryDevice() && account.getPniIdentityKeyPair() == null) {
                 throw new IOException("Missing PNI identity key, relinking required");
             }
-            if (account.getPreviousStorageVersion() < 4
+            if (account.getPreviousStorageVersion() < 10
                     && account.isPrimaryDevice()
                     && account.getRegistrationLockPin() != null) {
                 migrateRegistrationPin();
@@ -535,9 +535,9 @@ public class AccountHelper {
                         account.getAciIdentityKeyPair(),
                         account.getPniIdentityKeyPair(),
                         account.getProfileKey(),
+                        account.getOrCreateAccountEntropyPool(),
                         account.getOrCreatePinMasterKey(),
                         account.getOrCreateMediaRootBackupKey(),
-                        account.getOrCreateAccountEntropyPool(),
                         verificationCode.getVerificationCode(),
                         null));
         account.setMultiDevice(true);
@@ -595,7 +595,7 @@ public class AccountHelper {
         }
         account.setRegistrationLockPin(null);
 
-        dependencies.getAccountManager().deleteAccount();
+        handleResponseException(dependencies.getAccountApi().deleteAccount());
 
         account.setRegistered(false);
         unregisteredListener.call();