Decode query

This commit is contained in:
Mickael Remond
2018-01-13 19:14:26 +01:00
parent ec95020ac2
commit e14f58d9a9
2 changed files with 15 additions and 2 deletions

View File

@@ -19,8 +19,10 @@ func main() {
switch p := packet.(type) {
case xmpp.IQ:
fmt.Println("IQ received: ", p)
fmt.Println("IQ type:", p.Type)
switch p.Payload.(type) {
case *xmpp.Query:
fmt.Println("Received query:", p.Type)
}
default:
fmt.Println("Packet unhandled packet:", packet)
}