summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Serializer/PayloadSerializers')
-rw-r--r--Swiften/Serializer/PayloadSerializers/MAMQuerySerializer.cpp4
-rw-r--r--Swiften/Serializer/PayloadSerializers/UnitTest/MAMQuerySerializerTest.cpp3
2 files changed, 6 insertions, 1 deletions
diff --git a/Swiften/Serializer/PayloadSerializers/MAMQuerySerializer.cpp b/Swiften/Serializer/PayloadSerializers/MAMQuerySerializer.cpp
index 6a12f8e..591e73c 100644
--- a/Swiften/Serializer/PayloadSerializers/MAMQuerySerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/MAMQuerySerializer.cpp
@@ -33,6 +33,10 @@ std::string MAMQuerySerializer::serializePayload(boost::shared_ptr<MAMQuery> pay
element.setAttribute("queryid", *payload->getQueryID());
}
+ if (payload->getNode()) {
+ element.setAttribute("node", *payload->getNode());
+ }
+
if (payload->getForm()) {
element.addNode(boost::make_shared<XMLRawTextNode>(FormSerializer().serialize(payload->getForm())));
}
diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/MAMQuerySerializerTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/MAMQuerySerializerTest.cpp
index 7f6cbd9..1d695cd 100644
--- a/Swiften/Serializer/PayloadSerializers/UnitTest/MAMQuerySerializerTest.cpp
+++ b/Swiften/Serializer/PayloadSerializers/UnitTest/MAMQuerySerializerTest.cpp
@@ -44,11 +44,12 @@ class MAMQuerySerializerTest : public CppUnit::TestFixture {
boost::shared_ptr<MAMQuery> query(boost::make_shared<MAMQuery>());
query->setQueryID(std::string("id0"));
+ query->setNode(std::string("node1"));
query->setForm(parameters);
query->setResultSet(set);
std::string expectedResult =
- "<query queryid=\"id0\" xmlns=\"urn:xmpp:mam:0\">"
+ "<query node=\"node1\" queryid=\"id0\" xmlns=\"urn:xmpp:mam:0\">"
"<x type=\"form\" xmlns=\"jabber:x:data\">"
"<field type=\"text-single\" var=\"FORM_TYPE\">"
"<value>urn:xmpp:mam:0</value>"