diff options
author | Kevin Smith <git@kismith.co.uk> | 2011-10-05 07:34:05 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2011-10-05 07:34:05 (GMT) |
commit | 3e972565e51f5b2fa7e9768d5d84a7d4b6dfc09b (patch) | |
tree | b5b464804d169396f0cdd7348f4ae600ee2efe33 /Swiften/Serializer/PayloadSerializers/StorageSerializer.cpp | |
parent | 1f4be30a480818458fd841809585681597be831e (diff) | |
download | swift-contrib-3e972565e51f5b2fa7e9768d5d84a7d4b6dfc09b.zip swift-contrib-3e972565e51f5b2fa7e9768d5d84a7d4b6dfc09b.tar.bz2 |
Allow joining passworded MUCs.
Resolves: #991
Diffstat (limited to 'Swiften/Serializer/PayloadSerializers/StorageSerializer.cpp')
-rw-r--r-- | Swiften/Serializer/PayloadSerializers/StorageSerializer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Swiften/Serializer/PayloadSerializers/StorageSerializer.cpp b/Swiften/Serializer/PayloadSerializers/StorageSerializer.cpp index 30adf26..77fb3c0 100644 --- a/Swiften/Serializer/PayloadSerializers/StorageSerializer.cpp +++ b/Swiften/Serializer/PayloadSerializers/StorageSerializer.cpp @@ -24,21 +24,21 @@ std::string StorageSerializer::serializePayload(boost::shared_ptr<Storage> stora boost::shared_ptr<XMLElement> conferenceElement(new XMLElement("conference")); conferenceElement->setAttribute("name", room.name); conferenceElement->setAttribute("jid", room.jid); conferenceElement->setAttribute("autojoin", room.autoJoin ? "1" : "0"); if (!room.nick.empty()) { boost::shared_ptr<XMLElement> nickElement(new XMLElement("nick")); nickElement->addNode(boost::shared_ptr<XMLTextNode>(new XMLTextNode(room.nick))); conferenceElement->addNode(nickElement); } - if (!room.password.empty()) { + if (room.password) { boost::shared_ptr<XMLElement> passwordElement(new XMLElement("password")); - passwordElement->addNode(boost::shared_ptr<XMLTextNode>(new XMLTextNode(room.password))); + passwordElement->addNode(boost::shared_ptr<XMLTextNode>(new XMLTextNode(*room.password))); conferenceElement->addNode(passwordElement); } storageElement.addNode(conferenceElement); } foreach(const Storage::URL& url, storage->getURLs()) { boost::shared_ptr<XMLElement> urlElement(new XMLElement("url")); urlElement->setAttribute("name", url.name); urlElement->setAttribute("url", url.url); |