# HG changeset patch # User Kim Alvefur # Date 1480319303 -3600 # Node ID 7a1625a8462454636225395043131554ba7d99b8 # Parent bd3a1df128a4e038a9e789f14563f038c83e2f8e mod_pubsub_feeds: Ask for leases that expire after one day (Years after testing this module, I was still subscribed to a GNU Social instance) diff -r bd3a1df128a4 -r 7a1625a84624 mod_pubsub_feeds/mod_pubsub_feeds.lua --- a/mod_pubsub_feeds/mod_pubsub_feeds.lua Sat Nov 26 00:34:05 2016 +0100 +++ b/mod_pubsub_feeds/mod_pubsub_feeds.lua Mon Nov 28 08:48:23 2016 +0100 @@ -47,6 +47,7 @@ local feed_list = module:shared("feed_list"); local refresh_interval; +local lease_length = tostring(math.floor(module:get_option_number("feed_lease_length", 86400))); function module.load() local config = module:get_option("feeds", { }); @@ -185,7 +186,7 @@ ["hub.topic"] = feed.url; ["hub.verify"] = "async"; -- COMPAT this is REQUIRED in the 0.3 draft but removed in 0.4 ["hub.secret"] = feed.secret; - --["hub.lease_seconds"] = ""; + ["hub.lease_seconds"] = lease_length; }; --module:log("debug", "subscription request, body: %s", body);