xmpp/xmpp.go
changeset 178 ccfebbd9f49b
parent 176 52c100897e9d
child 180 3010996c1928
--- a/xmpp/xmpp.go	Wed Nov 06 20:40:50 2013 -0700
+++ b/xmpp/xmpp.go	Sat Nov 09 12:09:37 2013 -0700
@@ -93,7 +93,7 @@
 	pr Presence, status chan<- Status) (*Client, error) {
 
 	// Resolve the domain in the JID.
-	_, srvs, err := net.LookupSRV(clientSrv, "tcp", jid.Domain)
+	_, srvs, err := net.LookupSRV(clientSrv, "tcp", jid.Domain())
 	if err != nil {
 		return nil, fmt.Errorf("LookupSrv %s: %v", jid.Domain, err)
 	}
@@ -211,7 +211,7 @@
 	}
 
 	// Initial handshake.
-	hsOut := &stream{To: jid.Domain, Version: XMPPVersion}
+	hsOut := &stream{To: jid.Domain(), Version: XMPPVersion}
 	cl.sendRaw <- hsOut
 
 	// Wait until resource binding is complete.
@@ -224,7 +224,7 @@
 
 	// Initialize the session.
 	id := NextId()
-	iq := &Iq{Header: Header{To: cl.Jid.Domain, Id: id, Type: "set",
+	iq := &Iq{Header: Header{To: cl.Jid.Domain(), Id: id, Type: "set",
 		Nested: []interface{}{Generic{XMLName: xml.Name{Space: NsSession, Local: "session"}}}}}
 	ch := make(chan error)
 	f := func(st Stanza) {