aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2019-06-29 21:36:12 +0200
committerfiaxh <fiaxh@users.noreply.github.com>2019-06-30 14:22:25 +0200
commit925463b29602b8b14143cd2df15e86c8948396b8 (patch)
treed377d548426b41a02b6c82bb3ef91e2dc2d070a9
parentd429c3043241b35f52587a8bb8834b516117baa0 (diff)
downloaddino-925463b29602b8b14143cd2df15e86c8948396b8.tar.gz
dino-925463b29602b8b14143cd2df15e86c8948396b8.zip
mirror node value on disco request. fixes #258
-rw-r--r--xmpp-vala/src/module/xep/0030_service_discovery/info_result.vala7
1 files changed, 6 insertions, 1 deletions
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) {