From be8535765a2810aee038f7f58aef34d8eaa67993 Mon Sep 17 00:00:00 2001 From: Gaston Dombiak Date: Mon, 28 Mar 2005 16:54:49 +0000 Subject: [PATCH] Include error element in #toXML. SMACK-50 git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2468 b35dd754-fafc-0310-a699-88a17e54d16e --- source/org/jivesoftware/smack/packet/Presence.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/org/jivesoftware/smack/packet/Presence.java b/source/org/jivesoftware/smack/packet/Presence.java index 954218ac4..52e17d0f0 100644 --- a/source/org/jivesoftware/smack/packet/Presence.java +++ b/source/org/jivesoftware/smack/packet/Presence.java @@ -195,6 +195,12 @@ public class Presence extends Packet { buf.append(this.getExtensionsXML()); + // Add the error sub-packet, if there is one. + XMPPError error = getError(); + if (error != null) { + buf.append(error.toXML()); + } + buf.append(""); return buf.toString();