Improve generic IQ parsing

This commit is contained in:
Mickael Remond
2018-01-15 12:28:34 +01:00
parent ff2da776d3
commit dade3504f0
5 changed files with 113 additions and 13 deletions

View File

@@ -170,7 +170,8 @@ func bind(t *testing.T, c net.Conn, decoder *xml.Decoder) {
return
}
switch iq.Payload.(type) {
// TODO Check all elements
switch iq.Payload[0].(type) {
case *bindBind:
result := `<iq id='%s' type='result'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>