From 925463b29602b8b14143cd2df15e86c8948396b8 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Sat, 29 Jun 2019 21:36:12 +0200 Subject: [PATCH] mirror node value on disco request. fixes #258 --- .../src/module/xep/0030_service_discovery/info_result.vala | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/xmpp-vala/src/module/xep/0030_service_discovery/info_result.vala b/xmpp-vala/src/module/xep/0030_service_discovery/info_result.vala index dc7f1e48..65252261 100644 --- a/xmpp-vala/src/module/xep/0030_service_discovery/info_result.vala +++ b/xmpp-vala/src/module/xep/0030_service_discovery/info_result.vala @@ -39,7 +39,12 @@ public class InfoResult { public InfoResult(Iq.Stanza iq_request) { iq = new Iq.Stanza.result(iq_request); - iq.stanza.put_node(new StanzaNode.build("query", NS_URI_INFO).add_self_xmlns()); + string? node = iq_request.stanza.get_subnode("query", NS_URI_INFO).get_attribute("node"); + StanzaNode query = new StanzaNode.build("query", NS_URI_INFO).add_self_xmlns(); + if (node != null) { + query.set_attribute("node", node); + } + iq.stanza.put_node(query); } private InfoResult.from_iq(Iq.Stanza iq) {