diff options
author | Kim Alvefur <zash@zash.se> | 2018-08-05 15:52:19 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2018-08-05 15:52:19 +0200 |
commit | 27bbd90669cf314d6945892456e4ed0a20590302 (patch) | |
tree | 2ed8743401217edba1bfe410cc6f67f9f5b55dd7 | |
parent | 876b96659c284c4ab0cb3bbbfe0f8abb7b634562 (diff) | |
download | prosody-27bbd90669cf314d6945892456e4ed0a20590302.tar.gz prosody-27bbd90669cf314d6945892456e4ed0a20590302.zip |
mod_pubsub: Pass the current values to dataforms
-rw-r--r-- | plugins/mod_pubsub/pubsub.lib.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/mod_pubsub/pubsub.lib.lua b/plugins/mod_pubsub/pubsub.lib.lua index 9c12572a..adee989f 100644 --- a/plugins/mod_pubsub/pubsub.lib.lua +++ b/plugins/mod_pubsub/pubsub.lib.lua @@ -662,7 +662,12 @@ function handlers.owner_set_configure(origin, stanza, config, service) origin.send(st.error_reply(stanza, "modify", "bad-request", "Missing dataform")); return true; end - local form_data, err = node_config_form:data(config_form); + local ok, old_config = service:get_node_config(node, stanza.attr.from); + if not ok then + origin.send(pubsub_error_reply(stanza, old_config)); + return true; + end + local form_data, err = node_config_form:data(config_form, old_config); if not form_data then origin.send(st.error_reply(stanza, "modify", "bad-request", err)); return true; |