diff --git a/plugins/chanbackup.c b/plugins/chanbackup.c index 3b0d12860..cebd22013 100644 --- a/plugins/chanbackup.c +++ b/plugins/chanbackup.c @@ -1126,10 +1126,14 @@ static const struct plugin_notification notifs[] = { }, }; +static u64 custommsg_types[] = { WIRE_PEER_STORAGE, WIRE_PEER_STORAGE_RETRIEVAL }; + static const struct plugin_hook hooks[] = { { - "custommsg", - handle_your_peer_storage, + .name = "custommsg", + .handle = handle_your_peer_storage, + .intfilters = custommsg_types, + .num_intfilters = ARRAY_SIZE(custommsg_types), }, { "peer_connected", diff --git a/plugins/commando.c b/plugins/commando.c index f5022be8d..d0d2e91c8 100644 --- a/plugins/commando.c +++ b/plugins/commando.c @@ -603,10 +603,19 @@ static struct command_result *handle_custommsg(struct command *cmd, return command_hook_success(cmd); } +static u64 custommsg_types[] = { + COMMANDO_MSG_CMD_CONTINUES, + COMMANDO_MSG_CMD_TERM, + COMMANDO_MSG_REPLY_CONTINUES, + COMMANDO_MSG_REPLY_TERM, +}; + static const struct plugin_hook hooks[] = { { - "custommsg", - handle_custommsg + .name = "custommsg", + .handle = handle_custommsg, + .intfilters = custommsg_types, + .num_intfilters = ARRAY_SIZE(custommsg_types), }, };