]> nmode's Git Repositories - signal-cli/blobdiff - src/main/java/org/asamk/signal/commands/Commands.java
Ignore relay in json output if null
[signal-cli] / src / main / java / org / asamk / signal / commands / Commands.java
index 183b40a00a16a07d23e852f76fd77dc25c7a3159..4bc17930653f58cd39b959bd5f85519ff38e3969 100644 (file)
@@ -11,11 +11,13 @@ 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());
         addCommand("listGroups", new ListGroupsCommand());
         addCommand("listIdentities", new ListIdentitiesCommand());
+        addCommand("joinGroup", new JoinGroupCommand());
         addCommand("quitGroup", new QuitGroupCommand());
         addCommand("receive", new ReceiveCommand());
         addCommand("register", new RegisterCommand());
@@ -40,6 +42,13 @@ public class Commands {
         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);
     }