diff options
Diffstat (limited to 'Swiften/Serializer/XMPPSerializer.cpp')
-rw-r--r-- | Swiften/Serializer/XMPPSerializer.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Swiften/Serializer/XMPPSerializer.cpp b/Swiften/Serializer/XMPPSerializer.cpp index e3f43cd..1fb79e4 100644 --- a/Swiften/Serializer/XMPPSerializer.cpp +++ b/Swiften/Serializer/XMPPSerializer.cpp @@ -39,10 +39,10 @@ namespace Swift { -XMPPSerializer::XMPPSerializer(PayloadSerializerCollection* payloadSerializers, StreamType type) : type_(type) { - serializers_.push_back(boost::make_shared<PresenceSerializer>(payloadSerializers)); - serializers_.push_back(boost::make_shared<IQSerializer>(payloadSerializers)); - serializers_.push_back(boost::make_shared<MessageSerializer>(payloadSerializers)); +XMPPSerializer::XMPPSerializer(PayloadSerializerCollection* payloadSerializers, StreamType type, bool setExplictNSonTopLevelElements) : type_(type) { + serializers_.push_back(boost::make_shared<PresenceSerializer>(payloadSerializers, setExplictNSonTopLevelElements ? getDefaultNamespace() : boost::optional<std::string>())); + serializers_.push_back(boost::make_shared<IQSerializer>(payloadSerializers, setExplictNSonTopLevelElements ? getDefaultNamespace() : boost::optional<std::string>())); + serializers_.push_back(boost::make_shared<MessageSerializer>(payloadSerializers, setExplictNSonTopLevelElements ? getDefaultNamespace() : boost::optional<std::string>())); serializers_.push_back(boost::make_shared<CompressRequestSerializer>()); serializers_.push_back(boost::make_shared<CompressFailureSerializer>()); serializers_.push_back(boost::make_shared<AuthRequestSerializer>()); |