From e3b91475ffd7c1c76868964614f66060ba9e3a85 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Sat, 8 Feb 2014 08:04:33 +0100 Subject: Do not include an empty item XML element in join presences --- src/xmpp/xmpp_component.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/xmpp') diff --git a/src/xmpp/xmpp_component.cpp b/src/xmpp/xmpp_component.cpp index 92c614c..ef86213 100644 --- a/src/xmpp/xmpp_component.cpp +++ b/src/xmpp/xmpp_component.cpp @@ -324,7 +324,8 @@ void XmppComponent::send_user_join(const std::string& from, item["jid"] = preped_jid; } item.close(); - x.add_child(std::move(item)); + if (item.has_children()) + x.add_child(std::move(item)); if (self) { -- cgit v1.2.3