# HG changeset patch # User Florian Zeitz # Date 1291390573 -3600 # Node ID 6f25c09916a5e884867f80b44fc7a338c9006b56 # Parent 646aede54fc7eccf90cc362d6ec42993ca71309c mod_pubsub: Use pubsub_error_reply everywhere diff -r 646aede54fc7 -r 6f25c09916a5 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