mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 07:04:22 +01:00
plugins: undeprecate old form of hooks.
This effectively reverts ac93b780d5.
Christian points out that plugins need time before we deprecate
the old options (probably 6 months) as they need to work with
both old and new.
Changelog-Deprecated: **UNDO** plugins: hooks should now be specified using objects, not raw names.
Suggested-by: @cdecker
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -1108,12 +1108,10 @@ 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 if (deprecated_apis) {
|
||||
} else {
|
||||
/* FIXME: deprecate in 3 releases after v0.9.2! */
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user