Software /
code /
prosody
Comparison
plugins/mod_pubsub/pubsub.lib.lua @ 9207:76d593b35958
util.pubsub, pubsub.lib: Improve error on attempt to publish invalid item
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sat, 18 Aug 2018 15:26:35 +0100 |
parent | 9206:33ee40dc3e25 |
child | 9210:68e96dd437bb |
comparison
equal
deleted
inserted
replaced
9206:33ee40dc3e25 | 9207:76d593b35958 |
---|---|
28 ["forbidden"] = { "auth", "forbidden" }; | 28 ["forbidden"] = { "auth", "forbidden" }; |
29 ["not-allowed"] = { "cancel", "not-allowed" }; | 29 ["not-allowed"] = { "cancel", "not-allowed" }; |
30 ["not-acceptable"] = { "modify", "not-acceptable" }; | 30 ["not-acceptable"] = { "modify", "not-acceptable" }; |
31 ["internal-server-error"] = { "wait", "internal-server-error" }; | 31 ["internal-server-error"] = { "wait", "internal-server-error" }; |
32 ["precondition-not-met"] = { "cancel", "conflict", nil, "precondition-not-met" }; | 32 ["precondition-not-met"] = { "cancel", "conflict", nil, "precondition-not-met" }; |
33 ["invalid-item"] = { "modify", "bad-request", "invalid item" }; | |
33 }; | 34 }; |
34 local function pubsub_error_reply(stanza, error) | 35 local function pubsub_error_reply(stanza, error) |
35 local e = pubsub_errors[error]; | 36 local e = pubsub_errors[error]; |
36 local reply = st.error_reply(stanza, t_unpack(e, 1, 3)); | 37 local reply = st.error_reply(stanza, t_unpack(e, 1, 3)); |
37 if e[4] then | 38 if e[4] then |