From 34cc64f8ce97a63c859bd95faf6783422f14df61 Mon Sep 17 00:00:00 2001 From: AsamK Date: Fri, 7 Oct 2022 21:51:01 +0200 Subject: [PATCH] Ensure self profile key is always stored in profile store Fixes #1040 --- .../java/org/asamk/signal/manager/storage/SignalAccount.java | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/src/main/java/org/asamk/signal/manager/storage/SignalAccount.java b/lib/src/main/java/org/asamk/signal/manager/storage/SignalAccount.java index ff75b22b..335aece5 100644 --- a/lib/src/main/java/org/asamk/signal/manager/storage/SignalAccount.java +++ b/lib/src/main/java/org/asamk/signal/manager/storage/SignalAccount.java @@ -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()); }