]> nmode's Git Repositories - signal-cli/blobdiff - src/main/java/org/asamk/signal/manager/Manager.java
Refactor ProfileStore to handle name/uuid addresses correctly
[signal-cli] / src / main / java / org / asamk / signal / manager / Manager.java
index c4969fa45860c00a59748b129a25de8c1840779c..2ce59cdc0fd71dc361f39ff2e3a3964b8b20dbe0 100644 (file)
@@ -462,8 +462,8 @@ public class Manager implements Closeable {
         // Profiles are cache for 24h before retrieving them again
         if (profileEntry == null || profileEntry.getProfile() == null || now - profileEntry.getLastUpdateTimestamp() > 24 * 60 * 60 * 1000) {
             SignalProfile profile = retrieveRecipientProfile(address, unidentifiedAccess, profileKey);
-            profileEntry = new SignalProfileEntry(profileKey, now, profile);
-            account.getProfileStore().updateProfile(address, profileEntry);
+            account.getProfileStore().updateProfile(address, profileKey, now, profile);
+            return profile;
         }
         return profileEntry.getProfile();
     }