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::
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::
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*::
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::
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.
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*::
[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
[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
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) {
}
}
- 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);
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.");
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());
}
.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) {
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());
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();
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)
@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) {
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());
}
@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) {
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
}
}
- 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);
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");
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);
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());
}