Reformat code
This commit is contained in:
parent
237abe431b
commit
6c33a89f82
@ -527,8 +527,9 @@ public class ReceiveMessageHandler implements Manager.ReceiveMessageHandler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
System.out.println(" - Organisation: " +
|
System.out.println(" - Organisation: " + (
|
||||||
(contact.getOrganization().isPresent() ? contact.getOrganization().get() : "-"));
|
contact.getOrganization().isPresent() ? contact.getOrganization().get() : "-"
|
||||||
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (message.getSticker().isPresent()) {
|
if (message.getSticker().isPresent()) {
|
||||||
@ -614,8 +615,8 @@ public class ReceiveMessageHandler implements Manager.ReceiveMessageHandler {
|
|||||||
*/
|
*/
|
||||||
private void printMention(SignalServiceDataMessage.Mention mention, Manager m, int leadingSpaces) {
|
private void printMention(SignalServiceDataMessage.Mention mention, Manager m, int leadingSpaces) {
|
||||||
String spaces = " ".repeat(leadingSpaces);
|
String spaces = " ".repeat(leadingSpaces);
|
||||||
System.out.println(spaces + "- " + m.resolveSignalServiceAddress(new SignalServiceAddress(mention.getUuid(), null))
|
System.out.println(spaces + "- " + m.resolveSignalServiceAddress(new SignalServiceAddress(mention.getUuid(),
|
||||||
.getLegacyIdentifier() + ": " + mention.getStart() + " (length: " + mention.getLength() + ")");
|
null)).getLegacyIdentifier() + ": " + mention.getStart() + " (length: " + mention.getLength() + ")");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -626,7 +627,9 @@ public class ReceiveMessageHandler implements Manager.ReceiveMessageHandler {
|
|||||||
*/
|
*/
|
||||||
private void printAttachment(SignalServiceAttachment attachment, int leadingSpaces) {
|
private void printAttachment(SignalServiceAttachment attachment, int leadingSpaces) {
|
||||||
String spaces = " ".repeat(leadingSpaces);
|
String spaces = " ".repeat(leadingSpaces);
|
||||||
System.out.println(spaces + "- " + attachment.getContentType() + " (" + (attachment.isPointer() ? "Pointer" : "") + (
|
System.out.println(spaces + "- " + attachment.getContentType() + " (" + (
|
||||||
|
attachment.isPointer() ? "Pointer" : ""
|
||||||
|
) + (
|
||||||
attachment.isStream() ? "Stream" : ""
|
attachment.isStream() ? "Stream" : ""
|
||||||
) + ")");
|
) + ")");
|
||||||
if (attachment.isPointer()) {
|
if (attachment.isPointer()) {
|
||||||
|
@ -31,7 +31,6 @@ public class JsonSharedContact {
|
|||||||
@JsonProperty
|
@JsonProperty
|
||||||
final String organization;
|
final String organization;
|
||||||
|
|
||||||
|
|
||||||
public JsonSharedContact(SharedContact contact) {
|
public JsonSharedContact(SharedContact contact) {
|
||||||
name = new JsonContactName(contact.getName());
|
name = new JsonContactName(contact.getName());
|
||||||
if (contact.getAvatar().isPresent()) {
|
if (contact.getAvatar().isPresent()) {
|
||||||
@ -41,31 +40,19 @@ public class JsonSharedContact {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (contact.getPhone().isPresent()) {
|
if (contact.getPhone().isPresent()) {
|
||||||
phone = contact.getPhone()
|
phone = contact.getPhone().get().stream().map(JsonContactPhone::new).collect(Collectors.toList());
|
||||||
.get()
|
|
||||||
.stream()
|
|
||||||
.map(JsonContactPhone::new)
|
|
||||||
.collect(Collectors.toList());
|
|
||||||
} else {
|
} else {
|
||||||
phone = null;
|
phone = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (contact.getEmail().isPresent()) {
|
if (contact.getEmail().isPresent()) {
|
||||||
email = contact.getEmail()
|
email = contact.getEmail().get().stream().map(JsonContactEmail::new).collect(Collectors.toList());
|
||||||
.get()
|
|
||||||
.stream()
|
|
||||||
.map(JsonContactEmail::new)
|
|
||||||
.collect(Collectors.toList());
|
|
||||||
} else {
|
} else {
|
||||||
email = null;
|
email = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (contact.getAddress().isPresent()) {
|
if (contact.getAddress().isPresent()) {
|
||||||
address = contact.getAddress()
|
address = contact.getAddress().get().stream().map(JsonContactAddress::new).collect(Collectors.toList());
|
||||||
.get()
|
|
||||||
.stream()
|
|
||||||
.map(JsonContactAddress::new)
|
|
||||||
.collect(Collectors.toList());
|
|
||||||
} else {
|
} else {
|
||||||
address = null;
|
address = null;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user