diff options
Diffstat (limited to 'Swiften/Serializer/PayloadSerializers/PubSubUnsubscribeSerializer.cpp')
-rw-r--r-- | Swiften/Serializer/PayloadSerializers/PubSubUnsubscribeSerializer.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubUnsubscribeSerializer.cpp b/Swiften/Serializer/PayloadSerializers/PubSubUnsubscribeSerializer.cpp index 8a71583..e9a16d6 100644 --- a/Swiften/Serializer/PayloadSerializers/PubSubUnsubscribeSerializer.cpp +++ b/Swiften/Serializer/PayloadSerializers/PubSubUnsubscribeSerializer.cpp @@ -22,18 +22,18 @@ PubSubUnsubscribeSerializer::~PubSubUnsubscribeSerializer() { } std::string PubSubUnsubscribeSerializer::serializePayload(boost::shared_ptr<PubSubUnsubscribe> payload) const { - if (!payload) { - return ""; - } - XMLElement element("unsubscribe", "http://jabber.org/protocol/pubsub"); - if (payload->getNode()) { - element.setAttribute("node", *payload->getNode()); - } - element.setAttribute("jid", payload->getJID()); - if (payload->getSubscriptionID()) { - element.setAttribute("subid", *payload->getSubscriptionID()); - } - return element.serialize(); + if (!payload) { + return ""; + } + XMLElement element("unsubscribe", "http://jabber.org/protocol/pubsub"); + if (payload->getNode()) { + element.setAttribute("node", *payload->getNode()); + } + element.setAttribute("jid", payload->getJID()); + if (payload->getSubscriptionID()) { + element.setAttribute("subid", *payload->getSubscriptionID()); + } + return element.serialize(); } |