plugins/mod_storage_xep0227.lua
changeset 12178 a38b7cb5fd6a
parent 12177 270047afa6af
child 12179 39921b979edb
equal deleted inserted replaced
12177:270047afa6af 12178:a38b7cb5fd6a
   352 
   352 
   353 		-- Generate new data
   353 		-- Generate new data
   354 		local owner_el = st.stanza("pubsub", { xmlns = xmlns_pubsub_owner });
   354 		local owner_el = st.stanza("pubsub", { xmlns = xmlns_pubsub_owner });
   355 
   355 
   356 		for node_name, node_data in pairs(data) do
   356 		for node_name, node_data in pairs(data) do
       
   357 			if node_data == true then
       
   358 				node_data = { config = {} };
       
   359 			end
   357 			local configure_el = st.stanza("configure", { node = node_name })
   360 			local configure_el = st.stanza("configure", { node = node_name })
   358 				:add_child(lib_pubsub.node_config_form:form(node_data.config, "submit"));
   361 				:add_child(lib_pubsub.node_config_form:form(node_data.config, "submit"));
   359 			owner_el:add_child(configure_el);
   362 			owner_el:add_child(configure_el);
   360 			if node_data.affiliations and next(node_data.affiliations) ~= nil then
   363 			if node_data.affiliations and next(node_data.affiliations) ~= nil then
   361 				local affiliations_el = st.stanza("affiliations", { node = node_name });
   364 				local affiliations_el = st.stanza("affiliations", { node = node_name });