blob: 58dc657401f9bd4374b2d0bd8bf3414dd8cc6148 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
package xmpp
import (
"log"
)
type message struct {
Type string `xml:"type,attr"`
From string `xml:"from,attr"`
Body string `xml:"body"`
}
func handleMessage(s *session, m message) {
if m.Type == "chat" {
log.Printf("Got message '%s' from '%s'.\n", m.Body, m.From)
}
}
|