mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 02:20:39 +00:00
Update libsignal-service
This commit is contained in:
parent
eac2a47163
commit
9afd4e4328
6 changed files with 14 additions and 12 deletions
|
@ -448,9 +448,6 @@ public class ReceiveMessageHandler implements Manager.ReceiveMessageHandler {
|
|||
writer.println("Name:");
|
||||
var name = contact.name();
|
||||
writer.indent(w -> {
|
||||
if (name.display().isPresent() && !name.display().get().isBlank()) {
|
||||
w.println("Display name: {}", name.display().get());
|
||||
}
|
||||
if (name.given().isPresent() && !name.given().get().isBlank()) {
|
||||
w.println("First name: {}", name.given().get());
|
||||
}
|
||||
|
@ -466,6 +463,9 @@ public class ReceiveMessageHandler implements Manager.ReceiveMessageHandler {
|
|||
if (name.suffix().isPresent() && !name.suffix().get().isBlank()) {
|
||||
w.println("Suffix name: {}", name.suffix().get());
|
||||
}
|
||||
if (name.nickname().isPresent() && !name.nickname().get().isBlank()) {
|
||||
w.println("Display name: {}", name.nickname().get());
|
||||
}
|
||||
});
|
||||
|
||||
if (contact.avatar().isPresent()) {
|
||||
|
|
|
@ -4,11 +4,11 @@ import org.asamk.signal.manager.api.MessageEnvelope;
|
|||
import org.asamk.signal.util.Util;
|
||||
|
||||
public record JsonContactName(
|
||||
String display, String given, String family, String prefix, String suffix, String middle
|
||||
String nickname, String given, String family, String prefix, String suffix, String middle
|
||||
) {
|
||||
|
||||
static JsonContactName from(MessageEnvelope.Data.SharedContact.Name name) {
|
||||
return new JsonContactName(Util.getStringIfNotBlank(name.display()),
|
||||
return new JsonContactName(Util.getStringIfNotBlank(name.nickname()),
|
||||
Util.getStringIfNotBlank(name.given()),
|
||||
Util.getStringIfNotBlank(name.family()),
|
||||
Util.getStringIfNotBlank(name.prefix()),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue