Sent acknowledgment when somebody sends us a roster iq.
authorChris Jones <chris@cjones.org>
Thu, 05 Jan 2012 23:19:42 -0700
changeset 58 c0e8778bdb80
parent 57 e6cb3f049137
child 59 be6815a9653a
Sent acknowledgment when somebody sends us a roster iq.
roster.go
--- a/roster.go	Thu Jan 05 23:14:14 2012 -0700
+++ b/roster.go	Thu Jan 05 23:19:42 2012 -0700
@@ -96,7 +96,6 @@
 	go feedRoster(rosterCh, rosterUpdate)
 }
 
-// BUG(cjyar) RFC 3921, Section 7.4 says we need to reply.
 func maybeUpdateRoster(client *Client, st Stanza) {
 	rosterUpdate := rosterClients[client.Uid].rosterUpdate
 
@@ -105,6 +104,10 @@
 		for _, item := range(rq.Item) {
 			rosterUpdate <- item
 		}
+		// Send a reply.
+		iq := &Iq{To: st.GetFrom(), Id: st.GetId(), Type:
+			"result"}
+		client.Out <- iq
 	}
 }