diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
index 9f37145b..4953eaca 100644
--- a/.idea/codeStyles/Project.xml
+++ b/.idea/codeStyles/Project.xml
@@ -4,6 +4,28 @@
+
+
+
diff --git a/src/main/java/org/asamk/signal/JsonSyncMessage.java b/src/main/java/org/asamk/signal/JsonSyncMessage.java
index a6ecb459..326ec4ed 100644
--- a/src/main/java/org/asamk/signal/JsonSyncMessage.java
+++ b/src/main/java/org/asamk/signal/JsonSyncMessage.java
@@ -4,14 +4,13 @@ import org.whispersystems.signalservice.api.messages.multidevice.ReadMessage;
import org.whispersystems.signalservice.api.messages.multidevice.SignalServiceSyncMessage;
import org.whispersystems.signalservice.api.push.SignalServiceAddress;
-
import java.util.ArrayList;
import java.util.List;
enum JsonSyncMessageType {
- CONTACTS_SYNC,
- GROUPS_SYNC,
- REQUEST_SYNC
+ CONTACTS_SYNC,
+ GROUPS_SYNC,
+ REQUEST_SYNC
}
class JsonSyncMessage {
@@ -22,25 +21,25 @@ class JsonSyncMessage {
JsonSyncMessageType type;
JsonSyncMessage(SignalServiceSyncMessage syncMessage) {
- if (syncMessage.getSent().isPresent()) {
- this.sentMessage = new JsonSyncDataMessage(syncMessage.getSent().get());
- }
- if (syncMessage.getBlockedList().isPresent()) {
- this.blockedNumbers = new ArrayList<>(syncMessage.getBlockedList().get().getAddresses().size());
- for (SignalServiceAddress address : syncMessage.getBlockedList().get().getAddresses()) {
- this.blockedNumbers.add(address.getNumber().get());
- }
- }
- if (syncMessage.getRead().isPresent()) {
- this.readMessages = syncMessage.getRead().get();
- }
+ if (syncMessage.getSent().isPresent()) {
+ this.sentMessage = new JsonSyncDataMessage(syncMessage.getSent().get());
+ }
+ if (syncMessage.getBlockedList().isPresent()) {
+ this.blockedNumbers = new ArrayList<>(syncMessage.getBlockedList().get().getAddresses().size());
+ for (SignalServiceAddress address : syncMessage.getBlockedList().get().getAddresses()) {
+ this.blockedNumbers.add(address.getNumber().get());
+ }
+ }
+ if (syncMessage.getRead().isPresent()) {
+ this.readMessages = syncMessage.getRead().get();
+ }
- if (syncMessage.getContacts().isPresent()) {
- this.type = JsonSyncMessageType.CONTACTS_SYNC;
- } else if (syncMessage.getGroups().isPresent()) {
- this.type = JsonSyncMessageType.GROUPS_SYNC;
- } else if (syncMessage.getRequest().isPresent()) {
- this.type = JsonSyncMessageType.REQUEST_SYNC;
- }
- }
+ if (syncMessage.getContacts().isPresent()) {
+ this.type = JsonSyncMessageType.CONTACTS_SYNC;
+ } else if (syncMessage.getGroups().isPresent()) {
+ this.type = JsonSyncMessageType.GROUPS_SYNC;
+ } else if (syncMessage.getRequest().isPresent()) {
+ this.type = JsonSyncMessageType.REQUEST_SYNC;
+ }
+ }
}
diff --git a/src/main/java/org/asamk/signal/commands/BlockCommand.java b/src/main/java/org/asamk/signal/commands/BlockCommand.java
index a49fc798..305c5df2 100644
--- a/src/main/java/org/asamk/signal/commands/BlockCommand.java
+++ b/src/main/java/org/asamk/signal/commands/BlockCommand.java
@@ -2,6 +2,7 @@ package org.asamk.signal.commands;
import net.sourceforge.argparse4j.inf.Namespace;
import net.sourceforge.argparse4j.inf.Subparser;
+
import org.asamk.signal.GroupIdFormatException;
import org.asamk.signal.GroupNotFoundException;
import org.asamk.signal.manager.Manager;
diff --git a/src/main/java/org/asamk/signal/commands/ListContactsCommand.java b/src/main/java/org/asamk/signal/commands/ListContactsCommand.java
index 1d2b7b31..24d6898c 100644
--- a/src/main/java/org/asamk/signal/commands/ListContactsCommand.java
+++ b/src/main/java/org/asamk/signal/commands/ListContactsCommand.java
@@ -5,9 +5,11 @@ import net.sourceforge.argparse4j.inf.Subparser;
import org.asamk.signal.manager.Manager;
import org.asamk.signal.storage.contacts.ContactInfo;
+
import java.util.List;
public class ListContactsCommand implements LocalCommand {
+
@Override
public void attachToSubparser(final Subparser subparser) {
}
diff --git a/src/main/java/org/asamk/signal/commands/ReceiveCommand.java b/src/main/java/org/asamk/signal/commands/ReceiveCommand.java
index d28513b5..ffc59530 100644
--- a/src/main/java/org/asamk/signal/commands/ReceiveCommand.java
+++ b/src/main/java/org/asamk/signal/commands/ReceiveCommand.java
@@ -10,7 +10,6 @@ import org.asamk.signal.ReceiveMessageHandler;
import org.asamk.signal.manager.Manager;
import org.asamk.signal.util.DateUtils;
import org.freedesktop.dbus.DBusConnection;
-import org.freedesktop.dbus.DBusSigHandler;
import org.freedesktop.dbus.exceptions.DBusException;
import org.whispersystems.util.Base64;
@@ -54,7 +53,7 @@ public class ReceiveCommand implements ExtendedDbusCommand, LocalCommand {
});
dbusconnection.addSigHandler(Signal.ReceiptReceived.class,
receiptReceived -> System.out.print(String.format("Receipt from: %s\nTimestamp: %s\n",
- receiptReceived.getSender(), DateUtils.formatTimestamp(receiptReceived.getTimestamp()))));
+ receiptReceived.getSender(), DateUtils.formatTimestamp(receiptReceived.getTimestamp()))));
} catch (UnsatisfiedLinkError e) {
System.err.println("Missing native library dependency for dbus service: " + e.getMessage());
return 1;
diff --git a/src/main/java/org/asamk/signal/commands/SendContactsCommand.java b/src/main/java/org/asamk/signal/commands/SendContactsCommand.java
index 523292ab..20e81a60 100644
--- a/src/main/java/org/asamk/signal/commands/SendContactsCommand.java
+++ b/src/main/java/org/asamk/signal/commands/SendContactsCommand.java
@@ -2,6 +2,7 @@ package org.asamk.signal.commands;
import net.sourceforge.argparse4j.inf.Namespace;
import net.sourceforge.argparse4j.inf.Subparser;
+
import org.asamk.signal.manager.Manager;
import org.whispersystems.signalservice.api.crypto.UntrustedIdentityException;
diff --git a/src/main/java/org/asamk/signal/commands/UnblockCommand.java b/src/main/java/org/asamk/signal/commands/UnblockCommand.java
index be745cb0..2fad39a5 100644
--- a/src/main/java/org/asamk/signal/commands/UnblockCommand.java
+++ b/src/main/java/org/asamk/signal/commands/UnblockCommand.java
@@ -2,6 +2,7 @@ package org.asamk.signal.commands;
import net.sourceforge.argparse4j.inf.Namespace;
import net.sourceforge.argparse4j.inf.Subparser;
+
import org.asamk.signal.GroupIdFormatException;
import org.asamk.signal.GroupNotFoundException;
import org.asamk.signal.manager.Manager;