func NewStanza(to, from jid.JID, id, sType string) Stanza { return Stanza{ To: to.String(), From: from.String(), ID: id, Type: sType, } }
func NewBindResult(iq IQ, j jid.JID) BindResult { to := jid.New(iq.To) from := jid.New(iq.From) s := NewStanza(to, from, iq.ID, string(IQResult)) s.Namespaces = map[string]string{"": namespace.Client} result := element.Bind.AddChild( element.JID.SetText(j.String()), ) s = s.AddChild(result) iq = IQ{}.LoadStanza(s) return BindResult{IQ: iq} }