summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Parser')
-rw-r--r--Swiften/Parser/StreamFeaturesParser.cpp3
-rw-r--r--Swiften/Parser/UnitTest/StreamFeaturesParserTest.cpp2
2 files changed, 5 insertions, 0 deletions
diff --git a/Swiften/Parser/StreamFeaturesParser.cpp b/Swiften/Parser/StreamFeaturesParser.cpp
index f9e5b05..02e70be 100644
--- a/Swiften/Parser/StreamFeaturesParser.cpp
+++ b/Swiften/Parser/StreamFeaturesParser.cpp
@@ -22,6 +22,9 @@ void StreamFeaturesParser::handleStartElement(const String& element, const Strin
else if (element == "bind" && ns == "urn:ietf:params:xml:ns:xmpp-bind") {
getElementGeneric()->setHasResourceBind();
}
+ else if (element == "sm" && ns == "urn:xmpp:sm:2") {
+ getElementGeneric()->setHasStreamManagement();
+ }
else if (element == "mechanisms" && ns == "urn:ietf:params:xml:ns:xmpp-sasl") {
inMechanisms_ = true;
}
diff --git a/Swiften/Parser/UnitTest/StreamFeaturesParserTest.cpp b/Swiften/Parser/UnitTest/StreamFeaturesParserTest.cpp
index 1c6fa50..7f5a398 100644
--- a/Swiften/Parser/UnitTest/StreamFeaturesParserTest.cpp
+++ b/Swiften/Parser/UnitTest/StreamFeaturesParserTest.cpp
@@ -38,6 +38,7 @@ class StreamFeaturesParserTest : public CppUnit::TestFixture
"<mechanism>PLAIN</mechanism>"
"</mechanisms>"
"<bind xmlns=\"urn:ietf:params:xml:ns:xmpp-bind\"/>"
+ "<sm xmlns='urn:xmpp:sm:2'/>"
"<session xmlns=\"urn:ietf:params:xml:ns:xmpp-session\"/>"
"</stream:features>"));
@@ -50,6 +51,7 @@ class StreamFeaturesParserTest : public CppUnit::TestFixture
CPPUNIT_ASSERT(element->hasAuthenticationMechanisms());
CPPUNIT_ASSERT(element->hasAuthenticationMechanism("DIGEST-MD5"));
CPPUNIT_ASSERT(element->hasAuthenticationMechanism("PLAIN"));
+ CPPUNIT_ASSERT(element->hasStreamManagement());
}
void testParse_Empty() {