diff options
-rw-r--r-- | plugins/mod_pubsub/pubsub.lib.lua | 1 | ||||
-rw-r--r-- | util/pubsub.lua | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/plugins/mod_pubsub/pubsub.lib.lua b/plugins/mod_pubsub/pubsub.lib.lua index d1231183..d8d0506d 100644 --- a/plugins/mod_pubsub/pubsub.lib.lua +++ b/plugins/mod_pubsub/pubsub.lib.lua @@ -30,6 +30,7 @@ local pubsub_errors = { ["not-acceptable"] = { "modify", "not-acceptable" }; ["internal-server-error"] = { "wait", "internal-server-error" }; ["precondition-not-met"] = { "cancel", "conflict", nil, "precondition-not-met" }; + ["invalid-item"] = { "modify", "bad-request", "invalid item" }; }; local function pubsub_error_reply(stanza, error) local e = pubsub_errors[error]; diff --git a/util/pubsub.lua b/util/pubsub.lua index 3fbf1b45..c449625a 100644 --- a/util/pubsub.lua +++ b/util/pubsub.lua @@ -509,7 +509,7 @@ function service:publish(node, actor, id, item, required_config) return false, "precondition-not-met"; end if not self.config.itemcheck(item) then - return nil, "internal-server-error"; + return nil, "invalid-item"; end local node_data = self.data[node]; local ok = node_data:set(id, item); |