Mercurial > prosody-modules
comparison mod_pubsub_feeds/mod_pubsub_feeds.lua @ 6509:f61564e11d3b
various: Adjust for loop variables becoming constants in Lua 5.5
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Tue, 07 Apr 2026 14:30:31 +0200 |
| parents | 3f75ac4311bf |
| children |
comparison
equal
deleted
inserted
replaced
| 6508:3044e14fcaa0 | 6509:f61564e11d3b |
|---|---|
| 40 function module.load() | 40 function module.load() |
| 41 local config = module:get_option("feeds", { }); | 41 local config = module:get_option("feeds", { }); |
| 42 local ok, nodes = pubsub.service:get_nodes(true); | 42 local ok, nodes = pubsub.service:get_nodes(true); |
| 43 if not ok then nodes = {}; end | 43 if not ok then nodes = {}; end |
| 44 local new_feed_list = {}; | 44 local new_feed_list = {}; |
| 45 for node, url in pairs(config) do | 45 for i, url in pairs(config) do |
| 46 local node = i; | |
| 46 if type(node) == "number" then | 47 if type(node) == "number" then |
| 47 node = url; | 48 node = url; |
| 48 end | 49 end |
| 49 new_feed_list[node] = true; | 50 new_feed_list[node] = true; |
| 50 if not feed_list[node] then | 51 if not feed_list[node] then |
