| 25 | } |
| 26 | |
| 27 | bool notifications_have_topic(const struct plugins *plugins, const char *topic) |
| 28 | { |
| 29 | struct plugin *plugin; |
| 30 | if (notifications_topic_is_native(topic)) |
| 31 | return true; |
| 32 | |
| 33 | /* Some plugin at some point announced it'd be emitting |
| 34 | * notifications to this topic. */ |
| 35 | list_for_each(&plugins->plugins, plugin, list) { |
| 36 | for (size_t i = 0; i < tal_count(plugin->notification_topics); i++) |
| 37 | if (streq(plugin->notification_topics[i], topic)) |
| 38 | return true; |
| 39 | } |
| 40 | |
| 41 | return false; |
| 42 | } |
| 43 | |
| 44 | static void connect_notification_serialize(struct json_stream *stream, |
| 45 | const struct node_id *nodeid, |
no test coverage detected