equal
deleted
inserted
replaced
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) |