X-Git-Url: https://git.nmode.ca/signal-cli/blobdiff_plain/15e802971524cc061b72a1c5335140f517dd8f03..7b809c6547b0d473c1d03e9fac0fd501cde45a5b:/src/main/java/org/asamk/signal/commands/QuitGroupCommand.java diff --git a/src/main/java/org/asamk/signal/commands/QuitGroupCommand.java b/src/main/java/org/asamk/signal/commands/QuitGroupCommand.java index ee64bac5..0a0df346 100644 --- a/src/main/java/org/asamk/signal/commands/QuitGroupCommand.java +++ b/src/main/java/org/asamk/signal/commands/QuitGroupCommand.java @@ -37,7 +37,7 @@ public class QuitGroupCommand implements LocalCommand { public static void attachToSubparser(final Subparser subparser) { subparser.help("Send a quit group message to all group members and remove self from member list."); - subparser.addArgument("-g", "--group").required(true).help("Specify the recipient group ID."); + subparser.addArgument("-g", "--group-id", "--group").required(true).help("Specify the recipient group ID."); subparser.addArgument("--delete") .action(Arguments.storeTrue()) .help("Delete local group data completely after quitting group."); @@ -52,7 +52,7 @@ public class QuitGroupCommand implements LocalCommand { final GroupId groupId; try { - groupId = Util.decodeGroupId(ns.getString("group")); + groupId = Util.decodeGroupId(ns.getString("group-id")); } catch (GroupIdFormatException e) { throw new UserErrorException("Invalid group id: " + e.getMessage()); } @@ -63,7 +63,9 @@ public class QuitGroupCommand implements LocalCommand { try { final var results = m.sendQuitGroupMessage(groupId, groupAdmins == null ? Set.of() : new HashSet<>(groupAdmins)); - handleTimestampAndSendMessageResults(writer, results.first(), results.second()); + final var timestamp = results.first(); + writer.println("{}", timestamp); + handleTimestampAndSendMessageResults(results.second()); } catch (NotAGroupMemberException e) { logger.info("User is not a group member"); }