]> nmode's Git Repositories - signal-cli/commitdiff
Store family name in recipient store
authorAsamK <asamk@gmx.de>
Tue, 24 May 2022 19:08:52 +0000 (21:08 +0200)
committerAsamK <asamk@gmx.de>
Tue, 24 May 2022 19:09:06 +0000 (21:09 +0200)
lib/src/main/java/org/asamk/signal/manager/storage/recipients/RecipientStore.java

index 9011ae37421fcbd346c933e5a22e459d68e10d8b..cc9db862d47dfda9669798c53a2521f9fae01e3a 100644 (file)
@@ -73,7 +73,7 @@ public class RecipientStore implements RecipientResolver, RecipientTrustedResolv
                 Contact contact = null;
                 if (r.contact != null) {
                     contact = new Contact(r.contact.name,
-                            null,
+                            r.contact.familyName,
                             r.contact.color,
                             r.contact.messageExpirationTime,
                             r.contact.blocked,
@@ -580,7 +580,8 @@ public class RecipientStore implements RecipientResolver, RecipientTrustedResolv
             final var recipientContact = recipient.getContact();
             final var contact = recipientContact == null
                     ? null
-                    : new Storage.Recipient.Contact(recipientContact.getName(),
+                    : new Storage.Recipient.Contact(recipientContact.getGivenName(),
+                            recipientContact.getFamilyName(),
                             recipientContact.getColor(),
                             recipientContact.getMessageExpirationTime(),
                             recipientContact.isBlocked(),
@@ -640,6 +641,7 @@ public class RecipientStore implements RecipientResolver, RecipientTrustedResolv
 
             private record Contact(
                     String name,
+                    String familyName,
                     String color,
                     int messageExpirationTime,
                     boolean blocked,