X-Git-Url: https://git.nmode.ca/signal-cli/blobdiff_plain/48b2c7ff8ad7b653c3a0cb42775a5850f593d0a0..b77d8206615d991ab31753fd15a8fa894335eb74:/src/main/java/org/asamk/signal/commands/TrustCommand.java diff --git a/src/main/java/org/asamk/signal/commands/TrustCommand.java b/src/main/java/org/asamk/signal/commands/TrustCommand.java index eb99386b..78f22c19 100644 --- a/src/main/java/org/asamk/signal/commands/TrustCommand.java +++ b/src/main/java/org/asamk/signal/commands/TrustCommand.java @@ -13,12 +13,15 @@ import org.whispersystems.signalservice.api.util.InvalidNumberException; import java.util.Locale; -public class TrustCommand implements LocalCommand { +public class TrustCommand implements JsonRpcLocalCommand { - public TrustCommand(final OutputWriter outputWriter) { + @Override + public String getName() { + return "trust"; } - public static void attachToSubparser(final Subparser subparser) { + @Override + public void attachToSubparser(final Subparser subparser) { subparser.help("Set the trust level of a given number."); subparser.addArgument("number").help("Specify the phone number, for which to set the trust.").required(true); var mutTrust = subparser.addMutuallyExclusiveGroup(); @@ -30,7 +33,9 @@ public class TrustCommand implements LocalCommand { } @Override - public void handleCommand(final Namespace ns, final Manager m) throws CommandException { + public void handleCommand( + final Namespace ns, final Manager m, final OutputWriter outputWriter + ) throws CommandException { var number = ns.getString("number"); if (ns.getBoolean("trust-all-known-keys")) { boolean res;