xmpp/xmpp.go
changeset 158 2d948fcbb5d7
parent 157 eadf15a06ff5
child 162 7b5586a5e109
--- a/xmpp/xmpp.go	Sun Sep 29 21:33:03 2013 -0600
+++ b/xmpp/xmpp.go	Sun Sep 29 21:37:14 2013 -0600
@@ -76,10 +76,9 @@
 
 // Extensions can add stanza filters and/or new XML element types.
 type Extension struct {
-	// Maps from an XML namespace to a function which constructs a
-	// structure to hold the contents of stanzas in that
-	// namespace.
-	StanzaHandlers map[xml.Name]reflect.Type
+	// Maps from an XML name to a structure which holds stanza
+	// contents with that name.
+	StanzaTypes map[xml.Name]reflect.Type
 	// If non-nil, will be called once to start the filter
 	// running. RecvFilter intercepts incoming messages on their
 	// way from the remote server to the application; SendFilter
@@ -140,7 +139,7 @@
 
 	extStanza := make(map[xml.Name]reflect.Type)
 	for _, ext := range exts {
-		for k, v := range ext.StanzaHandlers {
+		for k, v := range ext.StanzaTypes {
 			if _, ok := extStanza[k]; ok {
 				return nil, fmt.Errorf("duplicate handler %s",
 					k)