changeset 3602:e302537a0e4e

xep-0215-0.6 requires service to be wrapped in services tag.
author Alexey Bobyr
date Thu, 23 May 2019 09:15:17 +0300
parents 013ef96a6d4d
children ec1d25ae6206
files mod_extdisco/mod_extdisco.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_extdisco/mod_extdisco.lua	Sat May 18 16:19:03 2019 +0200
+++ b/mod_extdisco/mod_extdisco.lua	Thu May 23 09:15:17 2019 +0300
@@ -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);
+	local reply = st.reply(stanza):tag('services', { xmlns = 'urn:xmpp:extdisco:1' });
 	for host, service_info in pairs(services) do
 		if not(service_type) or service_info.type == service_type then
 			reply:tag("service", {