summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Serializer/PayloadSerializers/DelaySerializer.cpp')
-rw-r--r--Swiften/Serializer/PayloadSerializers/DelaySerializer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Swiften/Serializer/PayloadSerializers/DelaySerializer.cpp b/Swiften/Serializer/PayloadSerializers/DelaySerializer.cpp
index 6148632..f809798 100644
--- a/Swiften/Serializer/PayloadSerializers/DelaySerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/DelaySerializer.cpp
@@ -20,7 +20,7 @@ DelaySerializer::DelaySerializer() : GenericPayloadSerializer<Delay>() {
std::string DelaySerializer::serializePayload(boost::shared_ptr<Delay> delay) const {
XMLElement delayElement("delay", "urn:xmpp:delay");
- if (delay->getFrom()) {
+ if (delay->getFrom() && delay->getFrom()->isValid()) {
delayElement.setAttribute("from", delay->getFrom()->toString());
}
delayElement.setAttribute("stamp", dateTimeToString(delay->getStamp()));