public MultiAccountManager initMultiAccountManager() {
final var managers = accountsStore.getAllAccounts().parallelStream().map(a -> {
try {
- return initManager(a.path());
+ return initManager(a.number(), a.path());
} catch (NotRegisteredException | IOException | AccountCheckException e) {
logger.warn("Ignoring {}: {} ({})", a.number(), e.getMessage(), e.getClass().getSimpleName());
return null;
final var accountPath = accountsStore.getPathByNumber(number);
if (accountPath == null || !SignalAccount.accountFileExists(pathConfig.dataPath(), accountPath)) {
final var newAccountPath = accountPath == null ? accountsStore.addAccount(number, null) : accountPath;
- var identityKey = KeyUtils.generateIdentityKeyPair();
+ var aciIdentityKey = KeyUtils.generateIdentityKeyPair();
+ var pniIdentityKey = KeyUtils.generateIdentityKeyPair();
var registrationId = KeyHelper.generateRegistrationId(false);
var profileKey = KeyUtils.createProfileKey();
var account = SignalAccount.create(pathConfig.dataPath(),
newAccountPath,
number,
- identityKey,
+ aciIdentityKey,
+ pniIdentityKey,
registrationId,
profileKey,
trustNewIdentity);