I'm starting to learn strophe library usage and when i use addHandler to parse response it seems to read only first node of xml response so when i receive a xml like that :
<body xmlns='http://jabber.org/protocol/httpbind'>
<presence xmlns='jabber:client' from='test2@localhost' to='test2@localhost' type='avaliable' id='5593:sendIQ'>
<status/>
</presence>
<presence xmlns='jabber:client' from='test@localhost' to='test2@localhost' xml:lang='en'>
<status />
</presence>
<iq xmlns='jabber:client' from='test2@localhost' to='test2@localhost' type='result'>
<query xmlns='jabber:iq:roster'>
<item subscription='both' name='test' jid='test@localhost'>
<group>test group</group>
</item>
</query>
</iq>
</body>
With the handler testHandler used like that :
connection.addHandler(testHandler,null,"presence");
function testHandler(stanza){
console.log(stanza);
}
It only logs :
<presence xmlns='jabber:client' from='test2@localhost' to='test2@localhost' type='avaliable' id='5593:sendIQ'>
<status/>
</presence>
What i am missing? is it a right behaviour? Should i add more handlers to get the other stanzas? Thanks for advance