mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-30 11:00:38 +00:00
25 lines
710 B
Java
25 lines
710 B
Java
package org.asamk.signal.commands;
|
|
|
|
import org.asamk.signal.BaseConfig;
|
|
import org.asamk.signal.JsonWriter;
|
|
import org.asamk.signal.OutputWriter;
|
|
import org.asamk.signal.commands.exceptions.CommandException;
|
|
import org.asamk.signal.manager.Manager;
|
|
|
|
import java.util.Map;
|
|
|
|
public class VersionCommand implements JsonRpcCommand<Void> {
|
|
|
|
@Override
|
|
public String getName() {
|
|
return "version";
|
|
}
|
|
|
|
@Override
|
|
public void handleCommand(
|
|
final Void request, final Manager m, final OutputWriter outputWriter
|
|
) throws CommandException {
|
|
final var jsonWriter = (JsonWriter) outputWriter;
|
|
jsonWriter.write(Map.of("version", BaseConfig.PROJECT_VERSION));
|
|
}
|
|
}
|