From 6618fc47ca08c09c8a3e5a6b0390784c064fc71f Mon Sep 17 00:00:00 2001 From: chteufleur Date: Fri, 16 Oct 2015 13:01:30 +0200 Subject: [PATCH] Add Status into Presence struct --- xmpp.go | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/xmpp.go b/xmpp.go index 629449e..114d9f9 100644 --- a/xmpp.go +++ b/xmpp.go @@ -554,10 +554,12 @@ type Contact struct { // Presence is an XMPP presence notification. type Presence struct { - From string - To string - Type string - Show string + From string + To string + Type string + Show string + Status string + } // Recv waits to receive the next XMPP stanza. @@ -589,7 +591,7 @@ func (c *Client) Recv() (stanza interface{}, err error) { } return Chat{Type: "roster", Roster: r}, nil case *clientPresence: - return Presence{v.From, v.To, v.Type, v.Show}, nil + return Presence{v.From, v.To, v.Type, v.Show, v.Status}, nil } } } @@ -722,7 +724,7 @@ type clientPresence struct { Lang string `xml:"lang,attr"` Show string `xml:"show"` // away, chat, dnd, xa - Status string `xml:"status,attr"` // sb []clientText + Status string `xml:"status"` // sb []clientText Priority string `xml:"priority,attr"` Error *clientError }