summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Parser/PayloadParsers/MIXJoinParser.cpp')
-rw-r--r--Swiften/Parser/PayloadParsers/MIXJoinParser.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/Swiften/Parser/PayloadParsers/MIXJoinParser.cpp b/Swiften/Parser/PayloadParsers/MIXJoinParser.cpp
index 0c09c44..6e72f90 100644
--- a/Swiften/Parser/PayloadParsers/MIXJoinParser.cpp
+++ b/Swiften/Parser/PayloadParsers/MIXJoinParser.cpp
@@ -9,7 +9,6 @@
#include <boost/optional.hpp>
#include <Swiften/Parser/PayloadParserFactory.h>
-#include <Swiften/Parser/PayloadParsers/MIXSubscribeParser.h>
#include <Swiften/Parser/PayloadParsers/FormParser.h>
using namespace Swift;
@@ -36,7 +35,9 @@ void MIXJoinParser::handleStartElement(const std::string& element, const std::st
if (level_ == 1) {
if (element == "subscribe" && ns == "urn:xmpp:mix:0") {
- currentPayloadParser_ = std::make_shared<MIXSubscribeParser>();
+ if (boost::optional<std::string> attributeValue = attributes.getAttributeValue("node")) {
+ getPayloadInternal()->addSubscription(*attributeValue);
+ }
}
if (element == "x" && ns == "jabber:x:data") {
currentPayloadParser_ = std::make_shared<FormParser>();
@@ -57,9 +58,6 @@ void MIXJoinParser::handleEndElement(const std::string& element, const std::stri
}
if (level_ == 1) {
- if (element == "subscribe" && ns == "urn:xmpp:mix:0") {
- getPayloadInternal()->addSubscription(std::dynamic_pointer_cast<MIXSubscribe>(currentPayloadParser_->getPayload()));
- }
if (element == "x" && ns == "jabber:x:data") {
getPayloadInternal()->setForm(std::dynamic_pointer_cast<Form>(currentPayloadParser_->getPayload()));
}