| 256 const char *type = xmlnode_get_attrib(packet, "type"); |
256 const char *type = xmlnode_get_attrib(packet, "type"); |
| 257 |
257 |
| 258 if(type && !strcmp(type, "get")) { |
258 if(type && !strcmp(type, "get")) { |
| 259 JabberIq *iq = jabber_iq_new_query(js, JABBER_IQ_RESULT, |
259 JabberIq *iq = jabber_iq_new_query(js, JABBER_IQ_RESULT, |
| 260 "http://jabber.org/protocol/disco#items"); |
260 "http://jabber.org/protocol/disco#items"); |
| |
261 |
| |
262 /* preserve node */ |
| |
263 xmlnode *iq_query = xmlnode_get_child_with_namespace(iq->node,"query","http://jabber.org/protocol/disco#items"); |
| |
264 if(iq_query) { |
| |
265 xmlnode *query = xmlnode_get_child_with_namespace(packet,"query","http://jabber.org/protocol/disco#items"); |
| |
266 if(query) { |
| |
267 const char *node = xmlnode_get_attrib(query,"node"); |
| |
268 if(node) |
| |
269 xmlnode_set_attrib(iq_query,"node",node); |
| |
270 } |
| |
271 } |
| 261 |
272 |
| 262 jabber_iq_set_id(iq, xmlnode_get_attrib(packet, "id")); |
273 jabber_iq_set_id(iq, xmlnode_get_attrib(packet, "id")); |
| 263 |
274 |
| 264 xmlnode_set_attrib(iq->node, "to", from); |
275 xmlnode_set_attrib(iq->node, "to", from); |
| 265 jabber_iq_send(iq); |
276 jabber_iq_send(iq); |