]> nmode's Git Repositories - signal-cli/blobdiff - src/main/java/org/asamk/signal/commands/DaemonCommand.java
Always include profile key in direct messages
[signal-cli] / src / main / java / org / asamk / signal / commands / DaemonCommand.java
index 2b9838518adb64ac3c7b140f89fd54acafc4a532..c5ee2edce8304a8975432437c38186d3eda531c1 100644 (file)
@@ -35,10 +35,6 @@ public class DaemonCommand implements LocalCommand {
 
     @Override
     public int handleCommand(final Namespace ns, final Manager m) {
 
     @Override
     public int handleCommand(final Namespace ns, final Manager m) {
-        if (!m.isRegistered()) {
-            System.err.println("User is not registered.");
-            return 1;
-        }
         DBusConnection conn = null;
         try {
             try {
         DBusConnection conn = null;
         try {
             try {
@@ -60,7 +56,13 @@ public class DaemonCommand implements LocalCommand {
             }
             boolean ignoreAttachments = ns.getBoolean("ignore_attachments");
             try {
             }
             boolean ignoreAttachments = ns.getBoolean("ignore_attachments");
             try {
-                m.receiveMessages(1, TimeUnit.HOURS, false, ignoreAttachments, ns.getBoolean("json") ? new JsonDbusReceiveMessageHandler(m, conn, SIGNAL_OBJECTPATH) : new DbusReceiveMessageHandler(m, conn, SIGNAL_OBJECTPATH));
+                m.receiveMessages(1,
+                        TimeUnit.HOURS,
+                        false,
+                        ignoreAttachments,
+                        ns.getBoolean("json")
+                                ? new JsonDbusReceiveMessageHandler(m, conn, SIGNAL_OBJECTPATH)
+                                : new DbusReceiveMessageHandler(m, conn, SIGNAL_OBJECTPATH));
                 return 0;
             } catch (IOException e) {
                 System.err.println("Error while receiving messages: " + e.getMessage());
                 return 0;
             } catch (IOException e) {
                 System.err.println("Error while receiving messages: " + e.getMessage());