]> nmode's Git Repositories - signal-cli/commitdiff
Replace --group parameter with --group-id
authorAsamK <asamk@gmx.de>
Tue, 10 Aug 2021 12:33:51 +0000 (14:33 +0200)
committerAsamK <asamk@gmx.de>
Tue, 10 Aug 2021 12:34:22 +0000 (14:34 +0200)
man/signal-cli.1.adoc
src/main/java/org/asamk/signal/commands/BlockCommand.java
src/main/java/org/asamk/signal/commands/QuitGroupCommand.java
src/main/java/org/asamk/signal/commands/RemoteDeleteCommand.java
src/main/java/org/asamk/signal/commands/SendCommand.java
src/main/java/org/asamk/signal/commands/SendReactionCommand.java
src/main/java/org/asamk/signal/commands/SendTypingCommand.java
src/main/java/org/asamk/signal/commands/UnblockCommand.java
src/main/java/org/asamk/signal/commands/UpdateGroupCommand.java

index 690e33b7e103a2a30709db249f986655afecef4d..0e3789e54005e51d84dff65fac266deca238eeea 100644 (file)
@@ -162,7 +162,7 @@ Send a message to another user or group.
 RECIPIENT::
 Specify the recipients’ phone number.
 
-*-g* GROUP, *--group* GROUP::
+*-g* GROUP, *--group-id* GROUP::
 Specify the recipient group ID in base64 encoding.
 
 *-m* MESSAGE, *--message* MESSAGE::
@@ -184,7 +184,7 @@ Send reaction to a previously received or sent message.
 RECIPIENT::
 Specify the recipients’ phone number.
 
-*-g* GROUP, *--group* GROUP::
+*-g* GROUP, *--group-id* GROUP::
 Specify the recipient group ID in base64 encoding.
 
 *-e* EMOJI, *--emoji* EMOJI::
@@ -207,7 +207,7 @@ Indicator will be shown for 15seconds unless a typing STOP message is sent first
 RECIPIENT::
 Specify the recipients’ phone number.
 
-*-g* GROUP, *--group* GROUP::
+*-g* GROUP, *--group-id* GROUP::
 Specify the recipient group ID in base64 encoding.
 
 *-s*, *--stop*::
@@ -220,7 +220,7 @@ Remotely delete a previously sent message.
 RECIPIENT::
 Specify the recipients’ phone number.
 
-*-g* GROUP, *--group* GROUP::
+*-g* GROUP, *--group-id* GROUP::
 Specify the recipient group ID in base64 encoding.
 
 *-t* TIMESTAMP, *--target-timestamp* TIMESTAMP::
@@ -250,7 +250,7 @@ The invitation link URI (starts with `https://signal.group/#`)
 Create or update a group.
 If the user is a pending member, this command will accept the group invitation.
 
-*-g* GROUP, *--group* GROUP::
+*-g* GROUP, *--group-id* GROUP::
 Specify the recipient group ID in base64 encoding.
 If not specified, a new group with a new random ID is generated.
 
@@ -296,7 +296,7 @@ To disable expiration set expiration time to 0.
 Send a quit group message to all group members and remove self from member list.
 If the user is a pending member, this command will decline the group invitation.
 
-*-g* GROUP, *--group* GROUP::
+*-g* GROUP, *--group-id* GROUP::
 Specify the recipient group ID in base64 encoding.
 
 *--delete*::
@@ -385,7 +385,7 @@ This change is only local but can be synchronized to other devices by using `sen
 [CONTACT [CONTACT ...]]::
 Specify the phone numbers of contacts that should be blocked.
 
-*-g* [GROUP [GROUP ...]], *--group* [GROUP [GROUP ...]]::
+*-g* [GROUP [GROUP ...]], *--group-id* [GROUP [GROUP ...]]::
 Specify the group IDs that should be blocked in base64 encoding.
 
 === unblock
@@ -396,7 +396,7 @@ This change is only local but can be synchronized to other devices by using `sen
 [CONTACT [CONTACT ...]]::
 Specify the phone numbers of contacts that should be unblocked.
 
-*-g* [GROUP [GROUP ...]], *--group* [GROUP [GROUP ...]]::
+*-g* [GROUP [GROUP ...]], *--group-id* [GROUP [GROUP ...]]::
 Specify the group IDs that should be unblocked in base64 encoding.
 
 === sendContacts
index e62bb79a946b1221271dd5f6f3216c9d04595ee4..29a1f3e53e5284f95df7f1de2338b109c35f5db8 100644 (file)
@@ -22,7 +22,7 @@ public class BlockCommand implements LocalCommand {
     public static void attachToSubparser(final Subparser subparser) {
         subparser.help("Block the given contacts or groups (no messages will be received)");
         subparser.addArgument("contact").help("Contact number").nargs("*");
-        subparser.addArgument("-g", "--group").help("Group ID").nargs("*");
+        subparser.addArgument("-g", "--group-id", "--group").help("Group ID").nargs("*");
     }
 
     public BlockCommand(final OutputWriter outputWriter) {
@@ -40,8 +40,8 @@ public class BlockCommand implements LocalCommand {
             }
         }
 
-        if (ns.<String>getList("group") != null) {
-            for (var groupIdString : ns.<String>getList("group")) {
+        if (ns.<String>getList("group-id") != null) {
+            for (var groupIdString : ns.<String>getList("group-id")) {
                 try {
                     var groupId = Util.decodeGroupId(groupIdString);
                     m.setGroupBlocked(groupId, true);
index ee64bac504a0a3cfcba98ed140b9ab9aab119493..cb98e15af08d9d26c40119ca215b82a688a2af60 100644 (file)
@@ -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());
         }
index acd912272ee301cc7247b754d34448b414048f7a..f1af3ae10a4c7366b263a466f4cd9e90c7aae9e2 100644 (file)
@@ -30,14 +30,14 @@ public class RemoteDeleteCommand implements DbusCommand {
                 .required(true)
                 .type(long.class)
                 .help("Specify the timestamp of the message to delete.");
-        subparser.addArgument("-g", "--group").help("Specify the recipient group ID.");
+        subparser.addArgument("-g", "--group-id", "--group").help("Specify the recipient group ID.");
         subparser.addArgument("recipient").help("Specify the recipients' phone number.").nargs("*");
     }
 
     @Override
     public void handleCommand(final Namespace ns, final Signal signal) throws CommandException {
         final List<String> recipients = ns.getList("recipient");
-        final var groupIdString = ns.getString("group");
+        final var groupIdString = ns.getString("group-id");
 
         final var noRecipients = recipients == null || recipients.isEmpty();
         if (noRecipients && groupIdString == null) {
index ae64fa9b5f0b5e113f5969fb1714c40ade134121..59ee691518128d762f0a61d7f0b5a27b7a0b8d9f 100644 (file)
@@ -36,7 +36,7 @@ public class SendCommand implements DbusCommand {
         subparser.help("Send a message to another user or group.");
         subparser.addArgument("recipient").help("Specify the recipients' phone number.").nargs("*");
         final var mutuallyExclusiveGroup = subparser.addMutuallyExclusiveGroup();
-        mutuallyExclusiveGroup.addArgument("-g", "--group").help("Specify the recipient group ID.");
+        mutuallyExclusiveGroup.addArgument("-g", "--group-id", "--group").help("Specify the recipient group ID.");
         mutuallyExclusiveGroup.addArgument("--note-to-self")
                 .help("Send the message to self without notification.")
                 .action(Arguments.storeTrue());
@@ -52,7 +52,7 @@ public class SendCommand implements DbusCommand {
     public void handleCommand(final Namespace ns, final Signal signal) throws CommandException {
         final List<String> recipients = ns.getList("recipient");
         final var isEndSession = ns.getBoolean("end-session");
-        final var groupIdString = ns.getString("group");
+        final var groupIdString = ns.getString("group-id");
         final var isNoteToSelf = ns.getBoolean("note-to-self");
 
         final var noRecipients = recipients == null || recipients.isEmpty();
index f77a2c4bde4d67dc9ba8bfe5e150b8c07c2eafba..f3385ce336257caf8d39aef7ef93953b752eb5af 100644 (file)
@@ -27,7 +27,7 @@ public class SendReactionCommand implements DbusCommand {
 
     public static void attachToSubparser(final Subparser subparser) {
         subparser.help("Send reaction to a previously received or sent message.");
-        subparser.addArgument("-g", "--group").help("Specify the recipient group ID.");
+        subparser.addArgument("-g", "--group-id", "--group").help("Specify the recipient group ID.");
         subparser.addArgument("recipient").help("Specify the recipients' phone number.").nargs("*");
         subparser.addArgument("-e", "--emoji")
                 .required(true)
@@ -45,7 +45,7 @@ public class SendReactionCommand implements DbusCommand {
     @Override
     public void handleCommand(final Namespace ns, final Signal signal) throws CommandException {
         final List<String> recipients = ns.getList("recipient");
-        final var groupIdString = ns.getString("group");
+        final var groupIdString = ns.getString("group-id");
 
         final var noRecipients = recipients == null || recipients.isEmpty();
         if (noRecipients && groupIdString == null) {
index cbf34a6d84f9aeed1e5de39cb71e30f5295571b8..77c1d70cda802f2ace240d9c7af5501112035546 100644 (file)
@@ -28,7 +28,7 @@ public class SendTypingCommand implements LocalCommand {
     public static void attachToSubparser(final Subparser subparser) {
         subparser.help(
                 "Send typing message to trigger a typing indicator for the recipient. Indicator will be shown for 15seconds unless a typing STOP message is sent first.");
-        subparser.addArgument("-g", "--group").help("Specify the recipient group ID.");
+        subparser.addArgument("-g", "--group-id", "--group").help("Specify the recipient group ID.");
         subparser.addArgument("recipient").help("Specify the recipients' phone number.").nargs("*");
         subparser.addArgument("-s", "--stop").help("Send a typing STOP message.").action(Arguments.storeTrue());
     }
@@ -36,7 +36,7 @@ public class SendTypingCommand implements LocalCommand {
     @Override
     public void handleCommand(final Namespace ns, final Manager m) throws CommandException {
         final var recipients = ns.<String>getList("recipient");
-        final var groupIdString = ns.getString("group");
+        final var groupIdString = ns.getString("group-id");
 
         final var noRecipients = recipients == null || recipients.isEmpty();
         if (noRecipients && groupIdString == null) {
index 412a904f934bb45d93265e45c935d97f9a77e4f8..e4366393cb5e84b40e6897a9ae4c1fc0ecc2aa68 100644 (file)
@@ -25,7 +25,7 @@ public class UnblockCommand implements LocalCommand {
     public static void attachToSubparser(final Subparser subparser) {
         subparser.help("Unblock the given contacts or groups (messages will be received again)");
         subparser.addArgument("contact").help("Contact number").nargs("*");
-        subparser.addArgument("-g", "--group").help("Group ID").nargs("*");
+        subparser.addArgument("-g", "--group-id", "--group").help("Group ID").nargs("*");
     }
 
     @Override
@@ -40,8 +40,8 @@ public class UnblockCommand implements LocalCommand {
             }
         }
 
-        if (ns.<String>getList("group") != null) {
-            for (var groupIdString : ns.<String>getList("group")) {
+        if (ns.<String>getList("group-id") != null) {
+            for (var groupIdString : ns.<String>getList("group-id")) {
                 try {
                     var groupId = Util.decodeGroupId(groupIdString);
                     m.setGroupBlocked(groupId, false);
index 20c9649bf516a7f12a13843e876fefe88d6293fd..59e393940a687f4e7d7ab181af4d3aa1e969c466 100644 (file)
@@ -42,7 +42,7 @@ public class UpdateGroupCommand implements DbusCommand, LocalCommand {
 
     public static void attachToSubparser(final Subparser subparser) {
         subparser.help("Create or update a group.");
-        subparser.addArgument("-g", "--group").help("Specify the recipient group ID.");
+        subparser.addArgument("-g", "--group-id", "--group").help("Specify the group ID.");
         subparser.addArgument("-n", "--name").help("Specify the new group name.");
         subparser.addArgument("-d", "--description").help("Specify the new group description.");
         subparser.addArgument("-a", "--avatar").help("Specify a new group avatar image file");
@@ -76,7 +76,7 @@ public class UpdateGroupCommand implements DbusCommand, LocalCommand {
     public void handleCommand(final Namespace ns, final Manager m) throws CommandException {
         final var writer = (PlainTextWriter) outputWriter;
         GroupId groupId = null;
-        final var groupIdString = ns.getString("group");
+        final var groupIdString = ns.getString("group-id");
         if (groupIdString != null) {
             try {
                 groupId = Util.decodeGroupId(groupIdString);
@@ -144,9 +144,9 @@ public class UpdateGroupCommand implements DbusCommand, LocalCommand {
     public void handleCommand(final Namespace ns, final Signal signal) throws CommandException {
         final var writer = (PlainTextWriter) outputWriter;
         byte[] groupId = null;
-        if (ns.getString("group") != null) {
+        if (ns.getString("group-id") != null) {
             try {
-                groupId = Util.decodeGroupId(ns.getString("group")).serialize();
+                groupId = Util.decodeGroupId(ns.getString("group-id")).serialize();
             } catch (GroupIdFormatException e) {
                 throw new UserErrorException("Invalid group id: " + e.getMessage());
             }