mod_extdisco: Reuse xmlns variable
authorKim Alvefur <zash@zash.se>
Thu, 23 May 2019 17:26:57 +0200
changeset 3607 ec1d25ae6206
parent 3606 e302537a0e4e
child 3608 60df58c5f7dd
mod_extdisco: Reuse xmlns variable
mod_extdisco/mod_extdisco.lua
--- a/mod_extdisco/mod_extdisco.lua	Thu May 23 09:15:17 2019 +0300
+++ b/mod_extdisco/mod_extdisco.lua	Thu May 23 17:26:57 2019 +0200
@@ -10,7 +10,7 @@
 	local origin, stanza = event.origin, event.stanza;
 	local service = stanza:get_child("service", xmlns_extdisco);
 	local service_type = service and service.attr.type;
-	local reply = st.reply(stanza):tag('services', { xmlns = 'urn:xmpp:extdisco:1' });
+	local reply = st.reply(stanza):tag("services", { xmlns = xmlns_extdisco });
 	for host, service_info in pairs(services) do
 		if not(service_type) or service_info.type == service_type then
 			reply:tag("service", {