]> nmode's Git Repositories - signal-cli/blobdiff - lib/src/main/java/org/asamk/signal/manager/helper/ProfileHelper.java
Refresh self profile before rotating profile key
[signal-cli] / lib / src / main / java / org / asamk / signal / manager / helper / ProfileHelper.java
index 387882780229b84cf4907a38f500f7471e0797be..812e4b3c4cdfc48a79e9140877449e7a62b60d46 100644 (file)
@@ -61,6 +61,8 @@ public final class ProfileHelper {
     }
 
     public void rotateProfileKey() throws IOException {
+        // refresh our profile, before creating a new profile key
+        getSelfProfile();
         var profileKey = KeyUtils.createProfileKey();
         account.setProfileKey(profileKey);
         context.getAccountHelper().updateAccountAttributes();