commando: use deprecation API for missing ids.

In this case we don't have a matching "command", so we need a special
API.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2024-01-25 10:58:56 +10:30
parent 5f899d0dd2
commit 8d68c608de
4 changed files with 38 additions and 1 deletions

View File

@@ -397,7 +397,8 @@ static void try_command(struct commando *incoming STEALS)
}
filter = json_get_member(buf, toks, "filter");
id = json_get_member(buf, toks, "id");
if (!id && !deprecated_apis) {
if (!id && !command_deprecated_in_nocmd_ok(plugin, "commando.missing-id",
"v23.02", "v24.02")) {
commando_error(incoming, COMMANDO_ERROR_REMOTE,
"missing id field");
return;