]> nmode's Git Repositories - signal-cli/blobdiff - src/main/java/org/asamk/signal/commands/SendCommand.java
Remove workaround for getBoolean from JsonRpcLocalCommand
[signal-cli] / src / main / java / org / asamk / signal / commands / SendCommand.java
index 1cd2e674ba8e5395089982bab13bdf58bfc48a01..dba7689f2fbad2a2e8b5600db8399d41d35bc025 100644 (file)
@@ -58,7 +58,7 @@ public class SendCommand implements JsonRpcLocalCommand {
     public void handleCommand(
             final Namespace ns, final Manager m, final OutputWriter outputWriter
     ) throws CommandException {
-        final var isNoteToSelf = ns.getBoolean("note-to-self");
+        final var isNoteToSelf = Boolean.TRUE.equals(ns.getBoolean("note-to-self"));
         final var recipientStrings = ns.<String>getList("recipient");
         final var groupIdStrings = ns.<String>getList("group-id");
 
@@ -67,7 +67,7 @@ public class SendCommand implements JsonRpcLocalCommand {
                 recipientStrings,
                 groupIdStrings);
 
-        final var isEndSession = ns.getBoolean("end-session");
+        final var isEndSession = Boolean.TRUE.equals(ns.getBoolean("end-session"));
         if (isEndSession) {
             final var singleRecipients = recipientIdentifiers.stream()
                     .filter(r -> r instanceof RecipientIdentifier.Single)