mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 18:40:39 +00:00
Implement jsonRpc command
Co-authored-by: technillogue <technillogue@gmail.com> Closes #668
This commit is contained in:
parent
6c00054407
commit
a8bbdb54d0
20 changed files with 863 additions and 31 deletions
|
@ -16,6 +16,7 @@ public class Commands {
|
|||
addCommand("block", BlockCommand::new, BlockCommand::attachToSubparser);
|
||||
addCommand("daemon", DaemonCommand::new, DaemonCommand::attachToSubparser);
|
||||
addCommand("getUserStatus", GetUserStatusCommand::new, GetUserStatusCommand::attachToSubparser);
|
||||
addCommand("jsonRpc", JsonRpcDispatcherCommand::new, JsonRpcDispatcherCommand::attachToSubparser);
|
||||
addCommand("link", LinkCommand::new, LinkCommand::attachToSubparser);
|
||||
addCommand("listContacts", ListContactsCommand::new, ListContactsCommand::attachToSubparser);
|
||||
addCommand("listDevices", ListDevicesCommand::new, ListDevicesCommand::attachToSubparser);
|
||||
|
@ -43,6 +44,7 @@ public class Commands {
|
|||
addCommand("updateProfile", UpdateProfileCommand::new, UpdateProfileCommand::attachToSubparser);
|
||||
addCommand("uploadStickerPack", UploadStickerPackCommand::new, UploadStickerPackCommand::attachToSubparser);
|
||||
addCommand("verify", VerifyCommand::new, VerifyCommand::attachToSubparser);
|
||||
addCommand("version", VersionCommand::new, null);
|
||||
}
|
||||
|
||||
public static Map<String, SubparserAttacher> getCommandSubparserAttachers() {
|
||||
|
@ -60,7 +62,9 @@ public class Commands {
|
|||
String name, CommandConstructor commandConstructor, SubparserAttacher subparserAttacher
|
||||
) {
|
||||
commands.put(name, commandConstructor);
|
||||
commandSubparserAttacher.put(name, subparserAttacher);
|
||||
if (subparserAttacher != null) {
|
||||
commandSubparserAttacher.put(name, subparserAttacher);
|
||||
}
|
||||
}
|
||||
|
||||
private interface CommandConstructor {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue