From 4759e8386373aae58ad47c21ea67b89f3e5cede2 Mon Sep 17 00:00:00 2001 From: Matt Goodall Date: Mon, 9 Jul 2012 14:47:50 +0100 Subject: [PATCH] Add stanza. --- src/xmpp/stanza.go | 5 +++++ src/xmpp/xmpp.go | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/xmpp/stanza.go b/src/xmpp/stanza.go index 369196e..af1ceed 100644 --- a/src/xmpp/stanza.go +++ b/src/xmpp/stanza.go @@ -48,3 +48,8 @@ type Presence struct { To string `xml:"to,attr,omitempty"` From string `xml:"from,attr,omitempty"` } + +// XMPP stanza. +type Error struct { + XMLName xml.Name `xml:"error"` +} diff --git a/src/xmpp/xmpp.go b/src/xmpp/xmpp.go index 7e26fce..746a8fb 100644 --- a/src/xmpp/xmpp.go +++ b/src/xmpp/xmpp.go @@ -115,6 +115,8 @@ func (x *XMPP) receiver() { var v interface{} switch start.Name.Local { + case "error": + v = &Error{} case "iq": v = &Iq{} case "message":