Update libsignal-service

This commit is contained in:
AsamK 2024-10-14 22:06:01 +02:00
parent eac2a47163
commit 9afd4e4328
6 changed files with 14 additions and 12 deletions

View file

@ -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()) {

View file

@ -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()),