# HG changeset patch # User Andreas Monitzer # Date 1183476874 0 # Node ID 22c848c81ccdf0ac2d1488be96e1e6a09836e560 # Parent 9d02fefaa5895856694ef8fdb6c91d26d7d228bd Now preserving the node on the (empty) disco#items replies. This is required for apps to add items on the correct nodes using signals. diff -r 9d02fefaa589 -r 22c848c81ccd libpurple/protocols/jabber/disco.c --- a/libpurple/protocols/jabber/disco.c Tue Jul 03 15:33:39 2007 +0000 +++ b/libpurple/protocols/jabber/disco.c Tue Jul 03 15:34:34 2007 +0000 @@ -258,6 +258,17 @@ if(type && !strcmp(type, "get")) { JabberIq *iq = jabber_iq_new_query(js, JABBER_IQ_RESULT, "http://jabber.org/protocol/disco#items"); + + /* preserve node */ + xmlnode *iq_query = xmlnode_get_child_with_namespace(iq->node,"query","http://jabber.org/protocol/disco#items"); + if(iq_query) { + xmlnode *query = xmlnode_get_child_with_namespace(packet,"query","http://jabber.org/protocol/disco#items"); + if(query) { + const char *node = xmlnode_get_attrib(query,"node"); + if(node) + xmlnode_set_attrib(iq_query,"node",node); + } + } jabber_iq_set_id(iq, xmlnode_get_attrib(packet, "id"));