# HG changeset patch # User Kim Alvefur # Date 1533477139 -7200 # Node ID a69dc9c729eca2dcf360d87570a91ce2e751893c # Parent e5eb36ee07a25e7a5111e4a1b610fc2745ec43fa mod_pubsub: Pass the current values to dataforms diff -r e5eb36ee07a2 -r a69dc9c729ec plugins/mod_pubsub/pubsub.lib.lua --- a/plugins/mod_pubsub/pubsub.lib.lua Sun Aug 05 15:50:06 2018 +0200 +++ b/plugins/mod_pubsub/pubsub.lib.lua Sun Aug 05 15:52:19 2018 +0200 @@ -662,7 +662,12 @@ 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;