]> nmode's Git Repositories - signal-cli/commitdiff
Ensure self profile key is always stored in profile store
authorAsamK <asamk@gmx.de>
Fri, 7 Oct 2022 19:51:01 +0000 (21:51 +0200)
committerAsamK <asamk@gmx.de>
Fri, 7 Oct 2022 19:51:01 +0000 (21:51 +0200)
Fixes #1040

lib/src/main/java/org/asamk/signal/manager/storage/SignalAccount.java

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