mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 02:20:39 +00:00
Initialize pre key offsets when creating new account
This commit is contained in:
parent
b41ebfe6b8
commit
0014a69528
1 changed files with 8 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue