examples/interact.go
changeset 26 4d0a369079ce
parent 23 b5de44679389
child 29 a456133ed0ac
--- a/examples/interact.go	Wed Dec 28 13:32:11 2011 -0700
+++ b/examples/interact.go	Wed Dec 28 15:47:27 2011 -0700
@@ -44,7 +44,13 @@
 			break
 		}
 		s := string(p)
-		c.TextOut <- &s
+		stan, err := xmpp.ParseStanza(s)
+		if err == nil {
+			c.Out <- stan
+		} else {
+			fmt.Printf("Parse error: %v\n", err)
+			break
+		}
 	}
 	fmt.Println("done sending")
 }