]> nmode's Git Repositories - signal-cli/commitdiff
Refresh self profile before rotating profile key
authorAsamK <asamk@gmx.de>
Mon, 23 May 2022 14:24:08 +0000 (16:24 +0200)
committerAsamK <asamk@gmx.de>
Mon, 23 May 2022 14:24:42 +0000 (16:24 +0200)
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();