Mercurial > prosody-modules
changeset 795:c7f507a190a0
mod_pubsub_feeds: Check if nodes exists in pubsub, make sure they get restored if not. (Thanks Maranda)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 15 Aug 2012 16:49:00 +0200 |
parents | 5a8fa70faa13 |
children | 9e1dab7310c0 |
files | mod_pubsub_feeds/mod_pubsub_feeds.lua |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_pubsub_feeds/mod_pubsub_feeds.lua Wed Aug 15 16:47:06 2012 +0200 +++ b/mod_pubsub_feeds/mod_pubsub_feeds.lua Wed Aug 15 16:49:00 2012 +0200 @@ -47,6 +47,7 @@ prosody_blog = "http://blog.prosody.im/feed/atom.xml"; }; refresh_interval = module:get_option_number("feed_pull_interval", 15) * 60; + local nodes = pubsub.service.get_nodes(true); local new_feed_list = {}; for node, url in pairs(config) do if type(node) == "number" then @@ -58,6 +59,9 @@ else feed_list[node].url = url; end + if not nodes[node] then + feed_list[node].last_update = 0; + end end for node in pairs(feed_list) do if not new_feed_list[node] then