diff options
Diffstat (limited to 'xmpp/message.go')
-rw-r--r-- | xmpp/message.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/xmpp/message.go b/xmpp/message.go new file mode 100644 index 0000000..58dc657 --- /dev/null +++ b/xmpp/message.go @@ -0,0 +1,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) + } +} |