Software /
code /
prosody-modules
Comparison
mod_pubsub_feeds/mod_pubsub_feeds.lua @ 797:68a067d5ed3b
mod_pubsub_feeds: util.pubsub methods return bool, data
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 15 Aug 2012 17:29:18 +0200 |
parent | 796:9e1dab7310c0 |
child | 983:ac9bf3fcbcfe |
comparison
equal
deleted
inserted
replaced
796:9e1dab7310c0 | 797:68a067d5ed3b |
---|---|
45 local config = module:get_option("feeds") or { | 45 local config = module:get_option("feeds") or { |
46 planet_jabber = "http://planet.jabber.org/atom.xml"; | 46 planet_jabber = "http://planet.jabber.org/atom.xml"; |
47 prosody_blog = "http://blog.prosody.im/feed/atom.xml"; | 47 prosody_blog = "http://blog.prosody.im/feed/atom.xml"; |
48 }; | 48 }; |
49 refresh_interval = module:get_option_number("feed_pull_interval", 15) * 60; | 49 refresh_interval = module:get_option_number("feed_pull_interval", 15) * 60; |
50 local nodes = pubsub.service:get_nodes(true); | 50 local ok, nodes = pubsub.service:get_nodes(true); |
51 if not ok then nodes = {}; end | |
51 local new_feed_list = {}; | 52 local new_feed_list = {}; |
52 for node, url in pairs(config) do | 53 for node, url in pairs(config) do |
53 if type(node) == "number" then | 54 if type(node) == "number" then |
54 node = url; | 55 node = url; |
55 end | 56 end |