mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-21 22:31:48 +01:00
plugins: deprecate old form of hooks.
Now both python and c libraries are updated, we can officially deprecate the old form. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-Deprecated: plugins: hooks should now be specified using objects, not raw names.
This commit is contained in:
parent
62c52fe868
commit
ac93b780d5
1 changed files with 4 additions and 1 deletions
|
@ -1078,9 +1078,12 @@ static const char *plugin_hooks_add(struct plugin *plugin, const char *buffer,
|
|||
name = json_strdup(tmpctx, buffer, nametok);
|
||||
beforetok = json_get_member(buffer, t, "before");
|
||||
aftertok = json_get_member(buffer, t, "after");
|
||||
} else {
|
||||
} else if (deprecated_apis) {
|
||||
name = json_strdup(tmpctx, plugin->buffer, t);
|
||||
beforetok = aftertok = NULL;
|
||||
} else {
|
||||
return tal_fmt(plugin,
|
||||
"hooks must be an array of objects");
|
||||
}
|
||||
|
||||
hook = plugin_hook_register(plugin, name);
|
||||
|
|
Loading…
Add table
Reference in a new issue