Software /
code /
prosody
Comparison
plugins/mod_pubsub.lua @ 3908:4d8081c35f01
mod_pubsub: Add 'forbidden' error support
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Tue, 21 Dec 2010 03:18:17 +0000 |
parent | 3761:e5fb26e8faeb |
child | 3911:a99a2bb7a6ec |
comparison
equal
deleted
inserted
replaced
3907:1e82c9b9db11 | 3908:4d8081c35f01 |
---|---|
27 local pubsub_errors = { | 27 local pubsub_errors = { |
28 ["conflict"] = { "cancel", "conflict" }; | 28 ["conflict"] = { "cancel", "conflict" }; |
29 ["invalid-jid"] = { "modify", "bad-request", nil, "invalid-jid" }; | 29 ["invalid-jid"] = { "modify", "bad-request", nil, "invalid-jid" }; |
30 ["item-not-found"] = { "cancel", "item-not-found" }; | 30 ["item-not-found"] = { "cancel", "item-not-found" }; |
31 ["not-subscribed"] = { "modify", "unexpected-request", nil, "not-subscribed" }; | 31 ["not-subscribed"] = { "modify", "unexpected-request", nil, "not-subscribed" }; |
32 ["forbidden"] = { "cancel", "forbidden" }; | |
32 }; | 33 }; |
33 function pubsub_error_reply(stanza, error) | 34 function pubsub_error_reply(stanza, error) |
34 local e = pubsub_errors[error]; | 35 local e = pubsub_errors[error]; |
35 local reply = st.error_reply(stanza, unpack(e, 1, 3)); | 36 local reply = st.error_reply(stanza, unpack(e, 1, 3)); |
36 if e[4] then | 37 if e[4] then |