Software /
code /
prosody-modules
Diff
mod_pubsub_feeds/mod_pubsub_feeds.lua @ 1453:7b53cfc6ba8d
mod_pubsub_feeds: Fix refresh_feeds() allways refreshing all feeds
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 26 Jun 2014 18:25:18 +0200 |
parent | 1343:7dbde05b48a9 |
child | 1454:480c6f0576b1 |
line wrap: on
line diff
--- a/mod_pubsub_feeds/mod_pubsub_feeds.lua Wed Jun 25 20:46:35 2014 +0200 +++ b/mod_pubsub_feeds/mod_pubsub_feeds.lua Thu Jun 26 18:25:18 2014 +0200 @@ -140,13 +140,12 @@ end); end -function refresh_feeds(force) - local now = time(); +function refresh_feeds(now) --module:log("debug", "Refreshing feeds"); for node, item in pairs(feed_list) do --FIXME Don't fetch feeds which have a subscription -- Otoho, what if the subscription expires or breaks? - if force or item.last_update + refresh_interval < now then + if item.subscription ~= "subscribe" and item.last_update + refresh_interval < now then --module:log("debug", "checking %s", item.node); fetch(item, update_entry); end