plugins/mod_pubsub/pubsub.lib.lua
changeset 8403 518b56d806bd
parent 8402 07443fe9df5b
child 8817 07197f29e2b8
equal deleted inserted replaced
8402:07443fe9df5b 8403:518b56d806bd
   295 		end
   295 		end
   296 	end
   296 	end
   297 	local ok, ret = service:publish(node, stanza.attr.from, id, item);
   297 	local ok, ret = service:publish(node, stanza.attr.from, id, item);
   298 	local reply;
   298 	local reply;
   299 	if ok then
   299 	if ok then
       
   300 		if type(ok) == "string" then
       
   301 			id = ok;
       
   302 		end
   300 		reply = st.reply(stanza)
   303 		reply = st.reply(stanza)
   301 			:tag("pubsub", { xmlns = xmlns_pubsub })
   304 			:tag("pubsub", { xmlns = xmlns_pubsub })
   302 				:tag("publish", { node = node })
   305 				:tag("publish", { node = node })
   303 					:tag("item", { id = id });
   306 					:tag("item", { id = id });
   304 	else
   307 	else