Replace --group parameter with --group-id

This commit is contained in:
AsamK 2021-08-10 14:33:51 +02:00
parent 15e8029715
commit 6c00054407
9 changed files with 28 additions and 28 deletions

View 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);