From e239a678b34730ae83d6a50b59fc48957bf331ea Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Mon, 29 Aug 2011 15:42:15 -0400 Subject: util.pubsub: Use built-in actor for auto-creating nodes on publish and subscribe (so they never fail due to permissions) --- util/pubsub.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util/pubsub.lua b/util/pubsub.lua index 69e79acc..cc606f66 100644 --- a/util/pubsub.lua +++ b/util/pubsub.lua @@ -104,7 +104,7 @@ function service:add_subscription(node, actor, jid, options) if not self.config.autocreate_on_subscribe then return false, "item-not-found"; else - local ok, err = self:create(node, actor); + local ok, err = self:create(node, true); if not ok then return ok, err; end @@ -220,7 +220,7 @@ function service:publish(node, actor, id, item) if not self.config.autocreate_on_publish then return false, "item-not-found"; end - local ok, err = self:create(node, actor); + local ok, err = self:create(node, true); if not ok then return ok, err; end -- cgit v1.2.3