std::string DelaySerializer::serializePayload(boost::shared_ptr<Delay> delay) const { XMLElement delayElement("delay", "urn:xmpp:delay"); if (delay->getFrom() && delay->getFrom()->isValid()) { delayElement.setAttribute("from", delay->getFrom()->toString()); } delayElement.setAttribute("stamp", dateTimeToString(delay->getStamp())); return delayElement.serialize(); }
std::string DelaySerializer::serializePayload(boost::shared_ptr<Delay> delay) const { XMLElement delayElement("delay", "urn:xmpp:delay"); if (delay->getFrom()) { delayElement.setAttribute("from", delay->getFrom()->toString()); } std::string stampString = boostPTimeToXEP0082(delay->getStamp()); delayElement.setAttribute("stamp", stampString); return delayElement.serialize(); }