Software /
code /
prosody
Changeset
3820:6f25c09916a5
mod_pubsub: Use pubsub_error_reply everywhere
author | Florian Zeitz <florob@babelmonkeys.de> |
---|---|
date | Fri, 03 Dec 2010 16:36:13 +0100 |
parents | 3819:646aede54fc7 |
children | 3821:cef2d5dc65e3 |
files | plugins/mod_pubsub.lua |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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