Changeset

765:82d292e4f30f

mod_pubsub_feeds: Use URL as node name if the config index is numeric
author Kim Alvefur <zash@zash.se>
date Wed, 01 Aug 2012 17:14:03 +0200
parents 764:d11d91ee81ed
children 766:1184fe8ebb21
files mod_pubsub_feeds/mod_pubsub_feeds.lua
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mod_pubsub_feeds/mod_pubsub_feeds.lua	Wed Aug 01 16:11:12 2012 +0200
+++ b/mod_pubsub_feeds/mod_pubsub_feeds.lua	Wed Aug 01 17:14:03 2012 +0200
@@ -51,6 +51,9 @@
 	refresh_interval = module:get_option_number("feed_pull_interval", 15) * 60;
 	local new_feed_list = {};
 	for node, url in pairs(config) do
+		if type(node) == "number" then
+			node = url;
+		end
 		new_feed_list[node] = true;
 		if not feed_list[node] then
 			feed_list[node] = { url = url; node = node; last_update = 0 };