Software /
code /
prosody-modules
Changeset
762:0a06cf46c263
mod_pubsub_feeds: Use the "superactor" instead of module.host/module.name
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 01 Aug 2012 16:08:15 +0200 |
parents | 761:48f8b312a509 |
children | 763:bcf0c9fff512 |
files | mod_pubsub_feeds/mod_pubsub_feeds.lua |
diffstat | 1 files changed, 3 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_pubsub_feeds/mod_pubsub_feeds.lua Wed Aug 01 02:33:43 2012 +0200 +++ b/mod_pubsub_feeds/mod_pubsub_feeds.lua Wed Aug 01 16:08:15 2012 +0200 @@ -71,8 +71,6 @@ update_config(); module:hook_global("config-reloaded", update_config); -local actor = module.host.."/"..module.name; - function update_entry(item) local node = item.node; module:log("debug", "parsing %d bytes of data in node %s", #item.data or 0, node) @@ -94,16 +92,16 @@ -- TODO Put data from /feed into item/source --module:log("debug", "publishing to %s, id %s", node, id); - local ok, err = modules.pubsub.service:publish(node, actor, id, xitem); + local ok, err = modules.pubsub.service:publish(node, true, id, xitem); if not ok then if err == "item-not-found" then -- try again --module:log("debug", "got item-not-found, creating %s and trying again", node); - local ok, err = modules.pubsub.service:create(node, actor); + local ok, err = modules.pubsub.service:create(node, true); if not ok then module:log("error", "could not create node %s: %s", node, err); return; end - local ok, err = modules.pubsub.service:publish(node, actor, id, xitem); + local ok, err = modules.pubsub.service:publish(node, true, id, xitem); if not ok then module:log("error", "could not create or publish node %s: %s", node, err); return