Mercurial > prosody-modules
comparison 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 |
comparison
equal
deleted
inserted
replaced
764:d11d91ee81ed | 765:82d292e4f30f |
---|---|
49 prosody_blog = "http://blog.prosody.im/feed/atom.xml"; | 49 prosody_blog = "http://blog.prosody.im/feed/atom.xml"; |
50 }; | 50 }; |
51 refresh_interval = module:get_option_number("feed_pull_interval", 15) * 60; | 51 refresh_interval = module:get_option_number("feed_pull_interval", 15) * 60; |
52 local new_feed_list = {}; | 52 local new_feed_list = {}; |
53 for node, url in pairs(config) do | 53 for node, url in pairs(config) do |
54 if type(node) == "number" then | |
55 node = url; | |
56 end | |
54 new_feed_list[node] = true; | 57 new_feed_list[node] = true; |
55 if not feed_list[node] then | 58 if not feed_list[node] then |
56 feed_list[node] = { url = url; node = node; last_update = 0 }; | 59 feed_list[node] = { url = url; node = node; last_update = 0 }; |
57 else | 60 else |
58 feed_list[node].url = url; | 61 feed_list[node].url = url; |