]> nmode's Git Repositories - signal-cli/blobdiff - lib/src/main/java/org/asamk/signal/manager/api/Contact.java
Fix creating builder from contact
[signal-cli] / lib / src / main / java / org / asamk / signal / manager / api / Contact.java
index 3605b7c57a7a3fd9e2efb440c6410a8d28b4188e..3eef0117023ce8e2ca8ecff8075bb26a9544ea37 100644 (file)
@@ -11,6 +11,7 @@ public record Contact(
         String note,
         String color,
         int messageExpirationTime,
+        int messageExpirationTimeVersion,
         long muteUntil,
         boolean hideStory,
         boolean isBlocked,
@@ -29,6 +30,7 @@ public record Contact(
                 builder.note,
                 builder.color,
                 builder.messageExpirationTime,
+                builder.messageExpirationTimeVersion,
                 builder.muteUntil,
                 builder.hideStory,
                 builder.isBlocked,
@@ -47,8 +49,12 @@ public record Contact(
         builder.givenName = copy.givenName();
         builder.familyName = copy.familyName();
         builder.nickName = copy.nickName();
+        builder.nickNameGivenName = copy.nickNameGivenName();
+        builder.nickNameFamilyName = copy.nickNameFamilyName();
+        builder.note = copy.note();
         builder.color = copy.color();
         builder.messageExpirationTime = copy.messageExpirationTime();
+        builder.messageExpirationTimeVersion = copy.messageExpirationTimeVersion();
         builder.muteUntil = copy.muteUntil();
         builder.hideStory = copy.hideStory();
         builder.isBlocked = copy.isBlocked();
@@ -84,6 +90,7 @@ public record Contact(
         private String note;
         private String color;
         private int messageExpirationTime;
+        private int messageExpirationTimeVersion = 1;
         private long muteUntil;
         private boolean hideStory;
         private boolean isBlocked;
@@ -139,6 +146,11 @@ public record Contact(
             return this;
         }
 
+        public Builder withMessageExpirationTimeVersion(final int val) {
+            messageExpirationTimeVersion = val;
+            return this;
+        }
+
         public Builder withMuteUntil(final long val) {
             muteUntil = val;
             return this;