mirror of
https://github.com/aljazceru/signal-cli.git
synced 2025-12-27 02:54:23 +01:00
Initialize pre key offsets when creating new account
This commit is contained in:
@@ -228,6 +228,7 @@ public class SignalAccount implements Closeable {
|
||||
signalAccount.pniAccountData.setIdentityKeyPair(pniIdentityKey);
|
||||
signalAccount.aciAccountData.setLocalRegistrationId(KeyHelper.generateRegistrationId(false));
|
||||
signalAccount.pniAccountData.setLocalRegistrationId(KeyHelper.generateRegistrationId(false));
|
||||
signalAccount.initAllPreKeyIds();
|
||||
signalAccount.settings = settings;
|
||||
|
||||
signalAccount.registered = false;
|
||||
@@ -974,6 +975,13 @@ public class SignalAccount implements Closeable {
|
||||
clearAllPreKeys(ServiceIdType.PNI);
|
||||
}
|
||||
|
||||
private void initAllPreKeyIds() {
|
||||
resetPreKeyOffsets(ServiceIdType.ACI);
|
||||
resetPreKeyOffsets(ServiceIdType.PNI);
|
||||
resetKyberPreKeyOffsets(ServiceIdType.ACI);
|
||||
resetKyberPreKeyOffsets(ServiceIdType.PNI);
|
||||
}
|
||||
|
||||
private void clearAllPreKeys(ServiceIdType serviceIdType) {
|
||||
final var accountData = getAccountData(serviceIdType);
|
||||
resetPreKeyOffsets(serviceIdType);
|
||||
|
||||
Reference in New Issue
Block a user