| 20 | } |
| 21 | |
| 22 | bool notifications_have_topic(const struct plugins *plugins, const char *topic) |
| 23 | { |
| 24 | struct plugin *plugin; |
| 25 | if (notifications_topic_is_native(topic)) |
| 26 | return true; |
| 27 | |
| 28 | /* Some plugin at some point announced it'd be emitting |
| 29 | * notifications to this topic. */ |
| 30 | list_for_each(&plugins->plugins, plugin, list) { |
| 31 | for (size_t i = 0; i < tal_count(plugin->notification_topics); i++) |
| 32 | if (streq(plugin->notification_topics[i], topic)) |
| 33 | return true; |
| 34 | } |
| 35 | |
| 36 | return false; |
| 37 | } |
| 38 | |
| 39 | /* Modern notifications X contain an object X */ |
| 40 | static struct jsonrpc_notification *notify_start(struct lightningd *ld, |
no test coverage detected