# HG changeset patch # User Kim Alvefur # Date 1403800363 -7200 # Node ID 13e359c48b5bd95a49e6a94f621ce741b9f544c2 # Parent 480c6f0576b199d0a320a58d7ac6d2269049d31f mod_pubsub_feeds: Fix refreshing of subscriptions diff -r 480c6f0576b1 -r 13e359c48b5b mod_pubsub_feeds/mod_pubsub_feeds.lua --- a/mod_pubsub_feeds/mod_pubsub_feeds.lua Thu Jun 26 18:29:01 2014 +0200 +++ b/mod_pubsub_feeds/mod_pubsub_feeds.lua Thu Jun 26 18:32:43 2014 +0200 @@ -113,9 +113,13 @@ end end + if item.lease_expires > time() then + item.subscription = nil; + item.lease_expires = nil; + end if use_pubsubhubub and not item.subscription then --module:log("debug", "check if %s has a hub", item.node); - local hub = feed.links and feed.links.hub; + local hub = item.hub or feed.links and feed.links.hub; if hub then item.hub = hub; module:log("debug", "%s has a hub: %s", item.node, item.hub);