comparison mod_pubsub_feeds/mod_pubsub_feeds.lua @ 1455:13e359c48b5b

mod_pubsub_feeds: Fix refreshing of subscriptions
author Kim Alvefur <zash@zash.se>
date Thu, 26 Jun 2014 18:32:43 +0200
parents 480c6f0576b1
children 2cd667d8edbd
comparison
equal deleted inserted replaced
1454:480c6f0576b1 1455:13e359c48b5b
111 end 111 end
112 end 112 end
113 end 113 end
114 end 114 end
115 115
116 if item.lease_expires > time() then
117 item.subscription = nil;
118 item.lease_expires = nil;
119 end
116 if use_pubsubhubub and not item.subscription then 120 if use_pubsubhubub and not item.subscription then
117 --module:log("debug", "check if %s has a hub", item.node); 121 --module:log("debug", "check if %s has a hub", item.node);
118 local hub = feed.links and feed.links.hub; 122 local hub = item.hub or feed.links and feed.links.hub;
119 if hub then 123 if hub then
120 item.hub = hub; 124 item.hub = hub;
121 module:log("debug", "%s has a hub: %s", item.node, item.hub); 125 module:log("debug", "%s has a hub: %s", item.node, item.hub);
122 subscribe(item); 126 subscribe(item);
123 end 127 end