]> nmode's Git Repositories - signal-cli/blobdiff - src/main/java/org/asamk/signal/commands/Commands.java
Restructure pre key refresh to be more robust
[signal-cli] / src / main / java / org / asamk / signal / commands / Commands.java
index 719ba132ac681f4857b6fb87c09e7bcf658fdcbd..a963ce4eab3575188b790b04bb88b8d286810cee 100644 (file)
@@ -17,6 +17,8 @@ public class Commands {
         addCommand(new FinishChangeNumberCommand());
         addCommand(new FinishLinkCommand());
         addCommand(new GetAttachmentCommand());
+        addCommand(new GetAvatarCommand());
+        addCommand(new GetStickerCommand());
         addCommand(new GetUserStatusCommand());
         addCommand(new AddStickerPackCommand());
         addCommand(new JoinGroupCommand());
@@ -72,8 +74,8 @@ public class Commands {
 
     private static void addCommand(Command command) {
         commands.put(command.getName(), command);
-        if (command instanceof CliCommand) {
-            commandSubparserAttacher.put(command.getName(), ((CliCommand) command)::attachToSubparser);
+        if (command instanceof CliCommand cliCommand) {
+            commandSubparserAttacher.put(command.getName(), cliCommand::attachToSubparser);
         }
     }
 }