xmpp/xmpp.go
changeset 180 3010996c1928
parent 178 ccfebbd9f49b
child 185 ba8a4ae40e13
equal deleted inserted replaced
179:4477c9f31f43 180:3010996c1928
   222 	// Forget about the password, for paranoia's sake.
   222 	// Forget about the password, for paranoia's sake.
   223 	cl.password = ""
   223 	cl.password = ""
   224 
   224 
   225 	// Initialize the session.
   225 	// Initialize the session.
   226 	id := NextId()
   226 	id := NextId()
   227 	iq := &Iq{Header: Header{To: cl.Jid.Domain(), Id: id, Type: "set",
   227 	iq := &Iq{Header: Header{To: JID(cl.Jid.Domain()), Id: id, Type: "set",
   228 		Nested: []interface{}{Generic{XMLName: xml.Name{Space: NsSession, Local: "session"}}}}}
   228 		Nested: []interface{}{Generic{XMLName: xml.Name{Space: NsSession, Local: "session"}}}}}
   229 	ch := make(chan error)
   229 	ch := make(chan error)
   230 	f := func(st Stanza) {
   230 	f := func(st Stanza) {
   231 		iq, ok := st.(*Iq)
   231 		iq, ok := st.(*Iq)
   232 		if !ok {
   232 		if !ok {