summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Serializer/PayloadSerializers/PubSubItemsSerializer.cpp')
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubItemsSerializer.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubItemsSerializer.cpp b/Swiften/Serializer/PayloadSerializers/PubSubItemsSerializer.cpp
index e2f7d6e..7c6d1f1 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubItemsSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/PubSubItemsSerializer.cpp
@@ -13,6 +13,7 @@
#include <Swiften/Serializer/PayloadSerializerCollection.h>
#include <Swiften/Base/foreach.h>
+#include <Swiften/Base/Log.h>
#include <Swiften/Serializer/PayloadSerializers/PubSubItemSerializer.h>
#include <Swiften/Serializer/XML/XMLRawTextNode.h>
@@ -29,6 +30,9 @@ std::string PubSubItemsSerializer::serializePayload(boost::shared_ptr<PubSubItem
return "";
}
XMLElement element("items", "http://jabber.org/protocol/pubsub");
+ if (payload->getNode().empty()) {
+ SWIFT_LOG(warning) << "Serializing PubSubItems with empty node attribute";
+ }
element.setAttribute("node", payload->getNode());
foreach(boost::shared_ptr<PubSubItem> item, payload->getItems()) {
element.addNode(boost::make_shared<XMLRawTextNode>(PubSubItemSerializer(serializers).serialize(item)));