]> nmode's Git Repositories - signal-cli/blobdiff - src/main/java/org/asamk/signal/storage/contacts/ContactInfo.java
Improve SignalServiceAddress handling
[signal-cli] / src / main / java / org / asamk / signal / storage / contacts / ContactInfo.java
index 1d754968a9d66c9f3e7c8b9712f23105c7c411fd..291303b213969653b4a3ebfb890a2de4034ac033 100644 (file)
@@ -1,7 +1,10 @@
 package org.asamk.signal.storage.contacts;
 
+import com.fasterxml.jackson.annotation.JsonIgnore;
 import com.fasterxml.jackson.annotation.JsonProperty;
 
+import org.whispersystems.signalservice.api.push.SignalServiceAddress;
+
 public class ContactInfo {
 
     @JsonProperty
@@ -15,4 +18,9 @@ public class ContactInfo {
 
     @JsonProperty
     public String profileKey;
+
+    @JsonIgnore
+    public SignalServiceAddress getAddress() {
+        return new SignalServiceAddress(null, number);
+    }
 }