/* * Copyright (c) 2015-2016 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ #include #include namespace Swift { ThreadSerializer::ThreadSerializer() : GenericPayloadSerializer() { } ThreadSerializer::~ThreadSerializer() { } std::string ThreadSerializer::serializePayload(std::shared_ptr thread) const { XMLElement threadNode("thread", "", thread->getText()); if (!thread->getParent().empty()) { threadNode.setAttribute("parent", thread->getParent()); } return threadNode.serialize(); } }