# HG changeset patch # User Kim Alvefur # Date 1458473902 -3600 # Node ID bd7744df0b4acffa91bf31536e88be230c2421c9 # Parent 85762420a2c0f6464d6dcfd55d4c0cbdcb60b8c9 mod_pubsub_feeds: Remove unused imports [luacheck] diff -r 85762420a2c0 -r bd7744df0b4a mod_pubsub_feeds/mod_pubsub_feeds.lua --- a/mod_pubsub_feeds/mod_pubsub_feeds.lua Sun Mar 20 12:37:56 2016 +0100 +++ b/mod_pubsub_feeds/mod_pubsub_feeds.lua Sun Mar 20 12:38:22 2016 +0100 @@ -44,8 +44,6 @@ local http = require "net.http"; local formdecode = http.formdecode; local formencode = http.formencode; -local urldecode = http.urldecode; -local urlencode = http.urlencode; local feed_list = module:shared("feed_list"); local refresh_interval; @@ -156,7 +154,7 @@ function refresh_feeds(now) --module:log("debug", "Refreshing feeds"); - for node, item in pairs(feed_list) do + for _, item in pairs(feed_list) do if item.subscription ~= "subscribe" and item.last_update + refresh_interval < now then --module:log("debug", "checking %s", item.node); fetch(item, update_entry); @@ -166,7 +164,7 @@ end local function format_url(node) - return module:http_url(nil, "/callback") .. "?node=" .. urlencode(node); + return module:http_url(nil, "/callback") .. "?" .. formencode({ node = node }); end function subscribe(feed, want)