--- a/xmpp.go Sun Dec 25 19:02:53 2011 -0700
+++ b/xmpp.go Mon Dec 26 11:48:35 2011 -0700
@@ -73,6 +73,10 @@
go readXml(cl.tcp, cl.in, debug)
go writeXml(cl.tcp, cl.out, debug)
+ // Initial handshake.
+ hsOut := &Stream{To: jid.Domain, Version: Version}
+ cl.Out <- hsOut
+
return cl, nil
}
@@ -125,8 +129,12 @@
continue
case "stream error":
obj = &StreamError{}
+ case nsStream + " features":
+ obj = &Features{}
default:
obj = &Unrecognized{}
+ log.Printf("Ignoring unrecognized: %s %s\n",
+ se.Name.Space, se.Name.Local)
}
// Read the complete XML stanza.