mirror of
https://github.com/aljazceru/signal-cli.git
synced 2025-12-25 10:04:23 +01:00
Refactor UpdateContactCommand
This commit is contained in:
@@ -21,7 +21,7 @@ public class Commands {
|
||||
addCommand("removePin", new RemovePinCommand());
|
||||
addCommand("send", new SendCommand());
|
||||
addCommand("sendContacts", new SendContactsCommand());
|
||||
addCommand("setContactName", new SetContactNameCommand());
|
||||
addCommand("updateContact", new UpdateContactCommand());
|
||||
addCommand("setPin", new SetPinCommand());
|
||||
addCommand("trust", new TrustCommand());
|
||||
addCommand("unregister", new UnregisterCommand());
|
||||
|
||||
@@ -11,7 +11,7 @@ public class SendContactsCommand implements LocalCommand {
|
||||
|
||||
@Override
|
||||
public void attachToSubparser(final Subparser subparser) {
|
||||
subparser.help("Send contacts to the signal server.");
|
||||
subparser.help("Send a synchronization message with the local contacts list to all linked devices.");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,19 +1,20 @@
|
||||
package org.asamk.signal.commands;
|
||||
|
||||
import net.sourceforge.argparse4j.impl.Arguments;
|
||||
import net.sourceforge.argparse4j.inf.Namespace;
|
||||
import net.sourceforge.argparse4j.inf.Subparser;
|
||||
|
||||
import org.asamk.signal.manager.Manager;
|
||||
|
||||
public class SetContactNameCommand implements LocalCommand {
|
||||
public class UpdateContactCommand implements LocalCommand {
|
||||
|
||||
@Override
|
||||
public void attachToSubparser(final Subparser subparser) {
|
||||
subparser.addArgument("number")
|
||||
.help("Contact number");
|
||||
subparser.addArgument("name")
|
||||
subparser.addArgument("-n", "--name")
|
||||
.required(true)
|
||||
.help("New contact name");
|
||||
subparser.help("Set the name of a given contact");
|
||||
subparser.help("Update the details of a given contact");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -30,5 +31,4 @@ public class SetContactNameCommand implements LocalCommand {
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user