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

@@ -163,7 +163,8 @@ func (s *Session) bind(o Options) {
return
}
switch payload := iq.Payload.(type) {
// TODO Check all elements
switch payload := iq.Payload[0].(type) {
case *bindBind:
s.BindJid = payload.Jid // our local id (with possibly randomly generated resource
default: