]> nmode's Git Repositories - signal-cli/blobdiff - src/main/java/org/asamk/signal/commands/Commands.java
Refactor identity key store
[signal-cli] / src / main / java / org / asamk / signal / commands / Commands.java
index 85e7af32665095f5cd2d6fdab7b91eb052ee8777..830049a584df5181571a5d0a13287306086d5c96 100644 (file)
@@ -11,6 +11,7 @@ public class Commands {
         addCommand("addDevice", new AddDeviceCommand());
         addCommand("block", new BlockCommand());
         addCommand("daemon", new DaemonCommand());
+        addCommand("getUserStatus", new GetUserStatusCommand());
         addCommand("link", new LinkCommand());
         addCommand("listContacts", new ListContactsCommand());
         addCommand("listDevices", new ListDevicesCommand());
@@ -21,26 +22,34 @@ public class Commands {
         addCommand("receive", new ReceiveCommand());
         addCommand("register", new RegisterCommand());
         addCommand("removeDevice", new RemoveDeviceCommand());
+        addCommand("remoteDelete", new RemoteDeleteCommand());
         addCommand("removePin", new RemovePinCommand());
         addCommand("send", new SendCommand());
-        addCommand("sendReaction", new SendReactionCommand());
         addCommand("sendContacts", new SendContactsCommand());
-        addCommand("updateContact", new UpdateContactCommand());
+        addCommand("sendReaction", new SendReactionCommand());
         addCommand("setPin", new SetPinCommand());
         addCommand("trust", new TrustCommand());
         addCommand("unblock", new UnblockCommand());
         addCommand("unregister", new UnregisterCommand());
         addCommand("updateAccount", new UpdateAccountCommand());
+        addCommand("updateContact", new UpdateContactCommand());
         addCommand("updateGroup", new UpdateGroupCommand());
         addCommand("updateProfile", new UpdateProfileCommand());
-        addCommand("verify", new VerifyCommand());
         addCommand("uploadStickerPack", new UploadStickerPackCommand());
+        addCommand("verify", new VerifyCommand());
     }
 
     public static Map<String, Command> getCommands() {
         return commands;
     }
 
+    public static Command getCommand(String commandKey) {
+        if (!commands.containsKey(commandKey)) {
+            return null;
+        }
+        return commands.get(commandKey);
+    }
+
     private static void addCommand(String name, Command command) {
         commands.put(name, command);
     }