summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2014-02-08 08:04:33 +0100
committerFlorent Le Coz <louiz@louiz.org>2014-02-08 08:04:33 +0100
commite3b91475ffd7c1c76868964614f66060ba9e3a85 (patch)
tree3b6c29d3b8f368707b2a4dca310d88ef699459c9
parentda85617428af0c35e9c5e7db21ec8a613ddd8b7c (diff)
downloadbiboumi-e3b91475ffd7c1c76868964614f66060ba9e3a85.tar.gz
biboumi-e3b91475ffd7c1c76868964614f66060ba9e3a85.tar.bz2
biboumi-e3b91475ffd7c1c76868964614f66060ba9e3a85.tar.xz
biboumi-e3b91475ffd7c1c76868964614f66060ba9e3a85.zip
Do not include an empty item XML element in join presences
-rw-r--r--src/xmpp/xmpp_component.cpp3
1 files changed, 2 insertions, 1 deletions
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)
{