# HG changeset patch # User Florian Zeitz # Date 1291390573 -3600 # Node ID 67c01f75af972dde4224871cd191a3d2ec7507ea # Parent a96f275c42b5179cdcfa4a58a73ac7eaf05c55a4 mod_pubsub: Use pubsub_error_reply everywhere diff -r a96f275c42b5 -r 67c01f75af97 plugins/mod_pubsub.lua --- a/plugins/mod_pubsub.lua Fri Dec 03 01:03:52 2010 +0500 +++ b/plugins/mod_pubsub.lua Fri Dec 03 16:36:13 2010 +0100 @@ -25,6 +25,7 @@ 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 @@ :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 @@ if ok then reply = st.reply(stanza); else - reply = st.error_reply(stanza, "cancel", ret); + reply = pubsub_error_reply(stanza, ret); end else repeat