diff options
Diffstat (limited to 'Swiften/Serializer/AuthSuccessSerializer.cpp')
-rw-r--r-- | Swiften/Serializer/AuthSuccessSerializer.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Swiften/Serializer/AuthSuccessSerializer.cpp b/Swiften/Serializer/AuthSuccessSerializer.cpp index 518c970..12aab8f 100644 --- a/Swiften/Serializer/AuthSuccessSerializer.cpp +++ b/Swiften/Serializer/AuthSuccessSerializer.cpp @@ -8,6 +8,7 @@ #include <Swiften/Elements/AuthSuccess.h> #include <Swiften/StringCodecs/Base64.h> +#include <Swiften/Base/ByteArray.h> namespace Swift { @@ -17,13 +18,13 @@ AuthSuccessSerializer::AuthSuccessSerializer() { std::string AuthSuccessSerializer::serialize(boost::shared_ptr<Element> element) const { boost::shared_ptr<AuthSuccess> authSuccess(boost::dynamic_pointer_cast<AuthSuccess>(element)); std::string value; - boost::optional<ByteArray> message = authSuccess->getValue(); + boost::optional<std::vector<unsigned char> > message = authSuccess->getValue(); if (message) { - if ((*message).isEmpty()) { + if ((*message).empty()) { value = "="; } else { - value = Base64::encode(*message); + value = Base64::encode(ByteArray(*message)); } } return "<success xmlns=\"urn:ietf:params:xml:ns:xmpp-sasl\">" + value + "</success>"; |