aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2011-08-29 15:42:15 -0400
committerMatthew Wild <mwild1@gmail.com>2011-08-29 15:42:15 -0400
commite239a678b34730ae83d6a50b59fc48957bf331ea (patch)
tree8e0616b79ed4da9e614670b636e93d2602cbe8f6
parentbe9a85a08af059ee16b242cdaba01b539d14ff32 (diff)
downloadprosody-e239a678b34730ae83d6a50b59fc48957bf331ea.tar.gz
prosody-e239a678b34730ae83d6a50b59fc48957bf331ea.zip
util.pubsub: Use built-in actor for auto-creating nodes on publish and subscribe (so they never fail due to permissions)
-rw-r--r--util/pubsub.lua4
1 files 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