From ce89bd0df9835eedd6597340ef25be76910988ca Mon Sep 17 00:00:00 2001 From: adaptivegarage Date: Mon, 5 Apr 2021 00:01:09 +0200 Subject: [PATCH] Implementation of remoteDelete command, iteration 2 --- .../java/org/asamk/signal/commands/RemoteDeleteCommand.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main/java/org/asamk/signal/commands/RemoteDeleteCommand.java b/src/main/java/org/asamk/signal/commands/RemoteDeleteCommand.java index 9bf4b556..81da8a27 100644 --- a/src/main/java/org/asamk/signal/commands/RemoteDeleteCommand.java +++ b/src/main/java/org/asamk/signal/commands/RemoteDeleteCommand.java @@ -26,7 +26,7 @@ public class RemoteDeleteCommand implements DbusCommand { .required(true) .type(long.class) .help("Specify the timestamp of the message to delete."); - var mut = subparser.addMutuallyExclusiveGroup().required(true); + var mut = subparser.addMutuallyExclusiveGroup(); mut.addArgument("-g", "--group").help("Specify the recipient group ID."); mut.addArgument("recipient").help("Specify the recipients' phone number.").nargs("*"); } @@ -36,8 +36,6 @@ public class RemoteDeleteCommand implements DbusCommand { final List recipients = ns.getList("recipient"); final var groupIdString = ns.getString("group"); - // Possibly unnecessary (see above — recipient(s) or group is required), - // but just for case... final var noRecipients = recipients == null || recipients.isEmpty(); if (noRecipients && groupIdString == null) { throw new UserErrorException("No recipients given");