aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Zeitz <florob@babelmonkeys.de>2010-12-03 16:36:13 +0100
committerFlorian Zeitz <florob@babelmonkeys.de>2010-12-03 16:36:13 +0100
commit3dce149c8b1eaafc7ec2a5ff8e263bc30a36bfe0 (patch)
tree7db0c141870d417f360dc02af5937d496fd7de99
parentf79be6e7200bf197bb786b787abf1c09b6932681 (diff)
downloadprosody-3dce149c8b1eaafc7ec2a5ff8e263bc30a36bfe0.tar.gz
prosody-3dce149c8b1eaafc7ec2a5ff8e263bc30a36bfe0.zip
mod_pubsub: Use pubsub_error_reply everywhere
-rw-r--r--plugins/mod_pubsub.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/mod_pubsub.lua b/plugins/mod_pubsub.lua
index f92d27aa..83ce0ad9 100644
--- a/plugins/mod_pubsub.lua
+++ b/plugins/mod_pubsub.lua
@@ -25,6 +25,7 @@ function handle_pubsub_iq(event)
end
local pubsub_errors = {
+ ["conflict"] = { "cancel", "conflict" };
["invalid-jid"] = { "modify", "bad-request", nil, "invalid-jid" };
["item-not-found"] = { "cancel", "item-not-found" };
};
@@ -50,7 +51,7 @@ function handlers.get_items(origin, stanza, items)
:tag("pubsub", { xmlns = xmlns_pubsub })
:add_child(data);
else
- reply = st.error_reply(stanza, "cancel", "item-not-found", "Item could not be found in this node");
+ reply = pubsub_error_reply(stanza, "item-not-found");
end
return origin.send(reply);
end
@@ -63,7 +64,7 @@ function handlers.set_create(origin, stanza, create)
if ok then
reply = st.reply(stanza);
else
- reply = st.error_reply(stanza, "cancel", ret);
+ reply = pubsub_error_reply(stanza, ret);
end
else
repeat