mirror of
https://github.com/AsamK/signal-cli
synced 2025-09-06 14:10:37 +00:00
Initial version of SharedContacts from data message. Need to change location of avatar downloaded and fix plain text mode
This commit is contained in:
parent
129a846cc1
commit
ec77074d0c
9 changed files with 279 additions and 3 deletions
47
src/main/java/org/asamk/signal/json/JsonContactAddress.java
Normal file
47
src/main/java/org/asamk/signal/json/JsonContactAddress.java
Normal file
|
@ -0,0 +1,47 @@
|
|||
package org.asamk.signal.json;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import org.whispersystems.signalservice.api.messages.shared.SharedContact;
|
||||
|
||||
public class JsonContactAddress {
|
||||
|
||||
@JsonProperty
|
||||
private final SharedContact.PostalAddress.Type type;
|
||||
|
||||
@JsonProperty
|
||||
private final String label;
|
||||
|
||||
@JsonProperty
|
||||
private final String street;
|
||||
|
||||
@JsonProperty
|
||||
private final String pobox;
|
||||
|
||||
@JsonProperty
|
||||
private final String neighborhood;
|
||||
|
||||
@JsonProperty
|
||||
private final String city;
|
||||
|
||||
@JsonProperty
|
||||
private final String region;
|
||||
|
||||
@JsonProperty
|
||||
private final String postcode;
|
||||
|
||||
@JsonProperty
|
||||
private final String country;
|
||||
|
||||
public JsonContactAddress(SharedContact.PostalAddress address) {
|
||||
type = address.getType();
|
||||
label = address.getLabel().orNull();
|
||||
street = address.getStreet().orNull();
|
||||
pobox = address.getPobox().orNull();
|
||||
neighborhood = address.getNeighborhood().orNull();
|
||||
city = address.getCity().orNull();
|
||||
region = address.getRegion().orNull();
|
||||
postcode = address.getPostcode().orNull();
|
||||
country = address.getCountry().orNull();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue