Ensure self profile key is always stored in profile store

Fixes #1040
This commit is contained in:
AsamK 2022-10-07 21:51:01 +02:00
parent ca5951861a
commit 34cc64f8ce

View file

@ -402,6 +402,7 @@ public class SignalAccount implements Closeable {
// Old config file, creating new profile key // Old config file, creating new profile key
setProfileKey(KeyUtils.createProfileKey()); setProfileKey(KeyUtils.createProfileKey());
} }
getProfileStore().storeProfileKey(getSelfRecipientId(), getProfileKey());
if (isPrimaryDevice() && getPniIdentityKeyPair() == null && getPni() != null) { if (isPrimaryDevice() && getPniIdentityKeyPair() == null && getPni() != null) {
setPniIdentityKeyPair(KeyUtils.generateIdentityKeyPair()); setPniIdentityKeyPair(KeyUtils.generateIdentityKeyPair());
} }