xmpp.go
changeset 111 36287f2cf06e
parent 110 7696e6a01709
child 113 bee6cc131798
equal deleted inserted replaced
110:7696e6a01709 111:36287f2cf06e
   266 // session, retrieve the roster, and broadcast an initial
   266 // session, retrieve the roster, and broadcast an initial
   267 // presence. The presence can be as simple as a newly-initialized
   267 // presence. The presence can be as simple as a newly-initialized
   268 // Presence struct.  See RFC 3921, Section 3.
   268 // Presence struct.  See RFC 3921, Section 3.
   269 func (cl *Client) StartSession(getRoster bool, pr *Presence) error {
   269 func (cl *Client) StartSession(getRoster bool, pr *Presence) error {
   270 	id := <-Id
   270 	id := <-Id
   271 	iq := &Iq{Stanza: Stanza{To: cl.Jid.Domain, Id: id, Type: "set",
   271 	iq := &Iq{Header: Header{To: cl.Jid.Domain, Id: id, Type: "set",
   272 		Nested: []interface{}{Generic{XMLName:
   272 		Nested: []interface{}{Generic{XMLName:
   273 			xml.Name{Space: NsSession, Local: "session"}}}}}
   273 			xml.Name{Space: NsSession, Local: "session"}}}}}
   274 	ch := make(chan error)
   274 	ch := make(chan error)
   275 	f := func(st interface{}) bool {
   275 	f := func(st interface{}) bool {
   276 		iq, ok := st.(*Iq)
   276 		iq, ok := st.(*Iq)