diff options
Diffstat (limited to 'Swiften/Serializer/PayloadSerializers/PubSubItemSerializer.cpp')
-rw-r--r-- | Swiften/Serializer/PayloadSerializers/PubSubItemSerializer.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubItemSerializer.cpp b/Swiften/Serializer/PayloadSerializers/PubSubItemSerializer.cpp index 93fa8e2..e32f17a 100644 --- a/Swiften/Serializer/PayloadSerializers/PubSubItemSerializer.cpp +++ b/Swiften/Serializer/PayloadSerializers/PubSubItemSerializer.cpp @@ -23,17 +23,17 @@ PubSubItemSerializer::~PubSubItemSerializer() { } std::string PubSubItemSerializer::serializePayload(boost::shared_ptr<PubSubItem> payload) const { - if (!payload) { - return ""; - } - XMLElement element("item", "http://jabber.org/protocol/pubsub"); - foreach(boost::shared_ptr<Payload> item, payload->getData()) { - element.addNode(boost::make_shared<XMLRawTextNode>(serializers->getPayloadSerializer(item)->serialize(item))); - } - if (!payload->getID().empty()) { - element.setAttribute("id", payload->getID()); - } - return element.serialize(); + if (!payload) { + return ""; + } + XMLElement element("item", "http://jabber.org/protocol/pubsub"); + foreach(boost::shared_ptr<Payload> item, payload->getData()) { + element.addNode(boost::make_shared<XMLRawTextNode>(serializers->getPayloadSerializer(item)->serialize(item))); + } + if (!payload->getID().empty()) { + element.setAttribute("id", payload->getID()); + } + return element.serialize(); } |