final var legacyProfileStore = jsonProcessor.convertValue(profileStoreNode, LegacyProfileStore.class);
for (var profileEntry : legacyProfileStore.getProfileEntries()) {
var recipientId = recipientStore.resolveRecipient(profileEntry.getServiceAddress());
- recipientStore.storeProfileKey(recipientId, profileEntry.getProfileKey());
recipientStore.storeProfileKeyCredential(recipientId, profileEntry.getProfileKeyCredential());
+ recipientStore.storeProfileKey(recipientId, profileEntry.getProfileKey());
final var profile = profileEntry.getProfile();
if (profile != null) {
final var capabilities = new HashSet<Profile.Capability>();
public void storeProfileKey(final RecipientId recipientId, final ProfileKey profileKey) {
synchronized (recipients) {
final var recipient = recipients.get(recipientId);
- if (profileKey.equals(recipient.getProfileKey())) {
+ if (profileKey != null && profileKey.equals(recipient.getProfileKey())) {
return;
}
} catch (NotRegisteredException e) {
throw new UserErrorException("User " + username + " is not registered.");
} catch (Throwable e) {
+ logger.debug("Loading state file failed", e);
throw new UnexpectedErrorException("Error loading state file for user "
+ username
+ ": "