Mercurial > prosody-modules
diff mod_pubsub_feeds/mod_pubsub_feeds.lua @ 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 | bcf0c9fff512 |
children | db27f07342d4 |
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 };