aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_private.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2010-05-23 23:11:00 +0100
committerMatthew Wild <mwild1@gmail.com>2010-05-23 23:11:00 +0100
commit9e416aeb5f79cf4dc78d93dfac59d98df5d32c33 (patch)
tree790cd084f0b10e92a585be2ea76ad68e482deb1e /plugins/mod_private.lua
parent898743c4b44d02694897b2c01d22e6b5f7106773 (diff)
parent84b7c3f97831c15d262663f6bc58b552adb11398 (diff)
downloadprosody-9e416aeb5f79cf4dc78d93dfac59d98df5d32c33.tar.gz
prosody-9e416aeb5f79cf4dc78d93dfac59d98df5d32c33.zip
Merge 0.7->trunk
Diffstat (limited to 'plugins/mod_private.lua')
-rw-r--r--plugins/mod_private.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/mod_private.lua b/plugins/mod_private.lua
index 859bf45a..abf1ec03 100644
--- a/plugins/mod_private.lua
+++ b/plugins/mod_private.lua
@@ -26,7 +26,11 @@ module:add_iq_handler("c2s", "jabber:iq:private",
if #query.tags == 1 then
local tag = query.tags[1];
local key = tag.name..":"..tag.attr.xmlns;
- local data = datamanager.load(node, host, "private");
+ local data, err = datamanager.load(node, host, "private");
+ if err then
+ session.send(st.error_reply(stanza, "wait", "internal-server-error"));
+ return true;
+ end
if stanza.attr.type == "get" then
if data and data[key] then
session.send(st.reply(stanza):tag("query", {xmlns = "jabber:iq:private"}):add_child(st.deserialize(data[key])));