mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 10:30:38 +00:00
Convert Contact to record
This commit is contained in:
parent
9741c93ce9
commit
9f4a2b3e26
7 changed files with 35 additions and 116 deletions
|
@ -62,11 +62,9 @@ public class ListContactsCommand implements JsonRpcLocalCommand {
|
|||
contact.getName(),
|
||||
profile.getDisplayName(),
|
||||
r.getAddress().username().orElse(""),
|
||||
contact.getColor(),
|
||||
contact.color(),
|
||||
contact.isBlocked(),
|
||||
contact.getMessageExpirationTime() == 0
|
||||
? "disabled"
|
||||
: contact.getMessageExpirationTime() + "s");
|
||||
contact.messageExpirationTime() == 0 ? "disabled" : contact.messageExpirationTime() + "s");
|
||||
}
|
||||
}
|
||||
case JsonWriter writer -> {
|
||||
|
@ -77,9 +75,9 @@ public class ListContactsCommand implements JsonRpcLocalCommand {
|
|||
address.uuid().map(UUID::toString).orElse(null),
|
||||
address.username().orElse(null),
|
||||
contact.getName(),
|
||||
contact.getColor(),
|
||||
contact.color(),
|
||||
contact.isBlocked(),
|
||||
contact.getMessageExpirationTime(),
|
||||
contact.messageExpirationTime(),
|
||||
r.getProfile() == null
|
||||
? null
|
||||
: new JsonContact.JsonProfile(r.getProfile().getLastUpdateTimestamp(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue