diff options
Diffstat (limited to 'Swiften/Serializer/PayloadSerializers/PubSubAffiliationsSerializer.cpp')
-rw-r--r-- | Swiften/Serializer/PayloadSerializers/PubSubAffiliationsSerializer.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubAffiliationsSerializer.cpp b/Swiften/Serializer/PayloadSerializers/PubSubAffiliationsSerializer.cpp index 4003b6c..eba96aa 100644 --- a/Swiften/Serializer/PayloadSerializers/PubSubAffiliationsSerializer.cpp +++ b/Swiften/Serializer/PayloadSerializers/PubSubAffiliationsSerializer.cpp @@ -24,17 +24,17 @@ PubSubAffiliationsSerializer::~PubSubAffiliationsSerializer() { } std::string PubSubAffiliationsSerializer::serializePayload(boost::shared_ptr<PubSubAffiliations> payload) const { - if (!payload) { - return ""; - } - XMLElement element("affiliations", "http://jabber.org/protocol/pubsub"); - if (payload->getNode()) { - element.setAttribute("node", *payload->getNode()); - } - foreach(boost::shared_ptr<PubSubAffiliation> item, payload->getAffiliations()) { - element.addNode(boost::make_shared<XMLRawTextNode>(PubSubAffiliationSerializer(serializers).serialize(item))); - } - return element.serialize(); + if (!payload) { + return ""; + } + XMLElement element("affiliations", "http://jabber.org/protocol/pubsub"); + if (payload->getNode()) { + element.setAttribute("node", *payload->getNode()); + } + foreach(boost::shared_ptr<PubSubAffiliation> item, payload->getAffiliations()) { + element.addNode(boost::make_shared<XMLRawTextNode>(PubSubAffiliationSerializer(serializers).serialize(item))); + } + return element.serialize(); } |