mirror node value on disco request. fixes #258

This commit is contained in:
Daniel Gultsch 2019-06-29 21:36:12 +02:00 committed by fiaxh
parent d429c30432
commit 925463b296

View file

@ -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) {