mirror of
https://github.com/AsamK/signal-cli.git
synced 2026-02-25 23:53:35 +00:00
* Initial version of SharedContacts from data message. Need to change location of avatar downloaded and fix plain text mode * Made empty strings for json null and fixed plaintext output * Removed old comments, simplified if-statement and added a 'leadingSpaces' field to the print attachments/mentions functions * Added AsamK's changes
37 lines
970 B
Java
37 lines
970 B
Java
package org.asamk.signal.json;
|
|
|
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
|
|
import org.asamk.signal.util.Util;
|
|
import org.whispersystems.signalservice.api.messages.shared.SharedContact;
|
|
|
|
public class JsonContactName {
|
|
|
|
@JsonProperty
|
|
private final String display;
|
|
|
|
@JsonProperty
|
|
private final String given;
|
|
|
|
@JsonProperty
|
|
private final String family;
|
|
|
|
@JsonProperty
|
|
private final String prefix;
|
|
|
|
@JsonProperty
|
|
private final String suffix;
|
|
|
|
@JsonProperty
|
|
private final String middle;
|
|
|
|
public JsonContactName(SharedContact.Name name) {
|
|
display = Util.getStringIfNotBlank(name.getDisplay());
|
|
given = Util.getStringIfNotBlank(name.getGiven());
|
|
family = Util.getStringIfNotBlank(name.getFamily());
|
|
prefix = Util.getStringIfNotBlank(name.getPrefix());
|
|
suffix = Util.getStringIfNotBlank(name.getSuffix());
|
|
middle = Util.getStringIfNotBlank(name.getMiddle());
|
|
}
|
|
}
|