X-Git-Url: https://git.nmode.ca/signal-cli/blobdiff_plain/3f7d8c60b9dc48d4aa9d81e065c0cf189af4d070..9ffacfe90e54a86da289d3e6fb3c3df738f57abb:/src/main/java/org/asamk/signal/commands/ReceiveCommand.java diff --git a/src/main/java/org/asamk/signal/commands/ReceiveCommand.java b/src/main/java/org/asamk/signal/commands/ReceiveCommand.java index 68292557..4d5bdff0 100644 --- a/src/main/java/org/asamk/signal/commands/ReceiveCommand.java +++ b/src/main/java/org/asamk/signal/commands/ReceiveCommand.java @@ -40,6 +40,9 @@ public class ReceiveCommand implements LocalCommand { subparser.addArgument("--ignore-attachments") .help("Don’t download attachments of received messages.") .action(Arguments.storeTrue()); + subparser.addArgument("--ignore-stories") + .help("Don’t receive story messages from the server.") + .action(Arguments.storeTrue()); subparser.addArgument("--send-read-receipts") .help("Send read receipts for all incoming data messages (in addition to the default delivery receipts)") .action(Arguments.storeTrue()); @@ -54,10 +57,11 @@ public class ReceiveCommand implements LocalCommand { public void handleCommand( final Namespace ns, final Manager m, final OutputWriter outputWriter ) throws CommandException { - double timeout = ns.getDouble("timeout"); - boolean ignoreAttachments = Boolean.TRUE.equals(ns.getBoolean("ignore-attachments")); - boolean sendReadReceipts = Boolean.TRUE.equals(ns.getBoolean("send-read-receipts")); - m.setReceiveConfig(new ReceiveConfig(ignoreAttachments, sendReadReceipts)); + final var timeout = ns.getDouble("timeout"); + final var ignoreAttachments = Boolean.TRUE.equals(ns.getBoolean("ignore-attachments")); + final var ignoreStories = Boolean.TRUE.equals(ns.getBoolean("ignore-stories")); + final var sendReadReceipts = Boolean.TRUE.equals(ns.getBoolean("send-read-receipts")); + m.setReceiveConfig(new ReceiveConfig(ignoreAttachments, ignoreStories, sendReadReceipts)); try { final var handler = outputWriter instanceof JsonWriter ? new JsonReceiveMessageHandler(m, (JsonWriter) outputWriter) : new ReceiveMessageHandler(m, (PlainTextWriter) outputWriter);