mirror of
https://github.com/aljazceru/signal-cli.git
synced 2026-01-31 11:34:21 +01:00
Prevent NPE during migration, when profile key is null
This commit is contained in:
@@ -547,8 +547,8 @@ public class SignalAccount implements Closeable {
|
||||
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>();
|
||||
|
||||
@@ -226,7 +226,7 @@ public class RecipientStore implements ContactsStore, ProfileStore {
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user