]> nmode's Git Repositories - signal-cli/commitdiff
Reformat code
authorAsamK <asamk@gmx.de>
Fri, 19 Feb 2021 17:04:08 +0000 (18:04 +0100)
committerAsamK <asamk@gmx.de>
Fri, 19 Feb 2021 17:04:08 +0000 (18:04 +0100)
src/main/java/org/asamk/signal/ReceiveMessageHandler.java
src/main/java/org/asamk/signal/json/JsonSharedContact.java

index 9ab752cfcb6033c42ba0f9960aa1e83745031f1d..c3bede8b8be80b56a21d6f8522a74905a19d51d0 100644 (file)
@@ -527,8 +527,9 @@ public class ReceiveMessageHandler implements Manager.ReceiveMessageHandler {
                     }
                 }
 
                     }
                 }
 
-                System.out.println(" - Organisation: " +
-                        (contact.getOrganization().isPresent() ? contact.getOrganization().get() : "-"));
+                System.out.println(" - Organisation: " + (
+                        contact.getOrganization().isPresent() ? contact.getOrganization().get() : "-"
+                ));
             }
         }
         if (message.getSticker().isPresent()) {
             }
         }
         if (message.getSticker().isPresent()) {
@@ -608,25 +609,27 @@ public class ReceiveMessageHandler implements Manager.ReceiveMessageHandler {
     /**
      * Prints the Signal mention information
      *
     /**
      * Prints the Signal mention information
      *
-     * @param mention is the Signal mention to print
-     * @param m is the Manager. used to resolve UUIDs into phone numbers if possible
+     * @param mention       is the Signal mention to print
+     * @param m             is the Manager. used to resolve UUIDs into phone numbers if possible
      * @param leadingSpaces is the number of spaces you want the message to be indented by
      */
     private void printMention(SignalServiceDataMessage.Mention mention, Manager m, int leadingSpaces) {
         String spaces = " ".repeat(leadingSpaces);
      * @param leadingSpaces is the number of spaces you want the message to be indented by
      */
     private void printMention(SignalServiceDataMessage.Mention mention, Manager m, int leadingSpaces) {
         String spaces = " ".repeat(leadingSpaces);
-        System.out.println(spaces + "- " + m.resolveSignalServiceAddress(new SignalServiceAddress(mention.getUuid(), null))
-                .getLegacyIdentifier() + ": " + mention.getStart() + " (length: " + mention.getLength() + ")");
+        System.out.println(spaces + "- " + m.resolveSignalServiceAddress(new SignalServiceAddress(mention.getUuid(),
+                null)).getLegacyIdentifier() + ": " + mention.getStart() + " (length: " + mention.getLength() + ")");
     }
 
     /**
      * Prints the Signal attachment information
      *
     }
 
     /**
      * Prints the Signal attachment information
      *
-     * @param attachment is the Signal attachment to print
+     * @param attachment    is the Signal attachment to print
      * @param leadingSpaces is the number of spaces you want the message to be indented by
      */
     private void printAttachment(SignalServiceAttachment attachment, int leadingSpaces) {
         String spaces = " ".repeat(leadingSpaces);
      * @param leadingSpaces is the number of spaces you want the message to be indented by
      */
     private void printAttachment(SignalServiceAttachment attachment, int 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" : ""
         ) + ")");
         if (attachment.isPointer()) {
                 attachment.isStream() ? "Stream" : ""
         ) + ")");
         if (attachment.isPointer()) {
index b1b7718cf5e32863d76c6b26234ad4512763d6c1..ea15b5748ff379e76faf801d661b03abc09bc88b 100644 (file)
@@ -31,7 +31,6 @@ public class JsonSharedContact {
     @JsonProperty
     final String organization;
 
     @JsonProperty
     final String organization;
 
-
     public JsonSharedContact(SharedContact contact) {
         name = new JsonContactName(contact.getName());
         if (contact.getAvatar().isPresent()) {
     public JsonSharedContact(SharedContact contact) {
         name = new JsonContactName(contact.getName());
         if (contact.getAvatar().isPresent()) {
@@ -41,31 +40,19 @@ public class JsonSharedContact {
         }
 
         if (contact.getPhone().isPresent()) {
         }
 
         if (contact.getPhone().isPresent()) {
-            phone = contact.getPhone()
-                    .get()
-                    .stream()
-                    .map(JsonContactPhone::new)
-                    .collect(Collectors.toList());
+            phone = contact.getPhone().get().stream().map(JsonContactPhone::new).collect(Collectors.toList());
         } else {
             phone = null;
         }
 
         if (contact.getEmail().isPresent()) {
         } else {
             phone = null;
         }
 
         if (contact.getEmail().isPresent()) {
-            email = contact.getEmail()
-                    .get()
-                    .stream()
-                    .map(JsonContactEmail::new)
-                    .collect(Collectors.toList());
+            email = contact.getEmail().get().stream().map(JsonContactEmail::new).collect(Collectors.toList());
         } else {
             email = null;
         }
 
         if (contact.getAddress().isPresent()) {
         } else {
             email = null;
         }
 
         if (contact.getAddress().isPresent()) {
-            address = contact.getAddress()
-                    .get()
-                    .stream()
-                    .map(JsonContactAddress::new)
-                    .collect(Collectors.toList());
+            address = contact.getAddress().get().stream().map(JsonContactAddress::new).collect(Collectors.toList());
         } else {
             address = null;
         }
         } else {
             address = null;
         }