From 08399fe0e7d8d5ab42975b51c487c82caf845cef Mon Sep 17 00:00:00 2001 From: Kevin Smith Date: Thu, 31 May 2012 09:57:42 +0100 Subject: Update message correction to use the published namespace. Resolves: #1124 diff --git a/Swiften/Parser/PayloadParsers/FullPayloadParserFactoryCollection.cpp b/Swiften/Parser/PayloadParsers/FullPayloadParserFactoryCollection.cpp index 01addf5..217f278 100644 --- a/Swiften/Parser/PayloadParsers/FullPayloadParserFactoryCollection.cpp +++ b/Swiften/Parser/PayloadParsers/FullPayloadParserFactoryCollection.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010 Remko Tronçon + * Copyright (c) 2010-2012 Remko Tronçon * Licensed under the GNU General Public License v3. * See Documentation/Licenses/GPLv3.txt for more information. */ @@ -76,6 +76,7 @@ FullPayloadParserFactoryCollection::FullPayloadParserFactoryCollection() { factories_.push_back(boost::make_shared >("show")); factories_.push_back(boost::make_shared >("status")); factories_.push_back(boost::make_shared >("replace", "http://swift.im/protocol/replace")); + factories_.push_back(boost::make_shared >("replace", "urn:xmpp:message-correct:0")); factories_.push_back(boost::make_shared >("query", "jabber:iq:last")); factories_.push_back(boost::make_shared >("body")); factories_.push_back(boost::make_shared >("subject")); diff --git a/Swiften/Parser/PayloadParsers/ReplaceParser.cpp b/Swiften/Parser/PayloadParsers/ReplaceParser.cpp index fb85fbd..728ed63 100644 --- a/Swiften/Parser/PayloadParsers/ReplaceParser.cpp +++ b/Swiften/Parser/PayloadParsers/ReplaceParser.cpp @@ -4,6 +4,14 @@ * See Documentation/Licenses/BSD-simplified.txt for more information. */ +/* + * Copyright (c) 2012 Kevin Smith + * Licensed under the GNU General Public License v3. + * See Documentation/Licenses/GPLv3.txt for more information. + */ + + + #include namespace Swift { diff --git a/Swiften/Serializer/PayloadSerializers/ReplaceSerializer.h b/Swiften/Serializer/PayloadSerializers/ReplaceSerializer.h index 88ad2b3..85c114c 100644 --- a/Swiften/Serializer/PayloadSerializers/ReplaceSerializer.h +++ b/Swiften/Serializer/PayloadSerializers/ReplaceSerializer.h @@ -4,6 +4,12 @@ * See Documentation/Licenses/BSD-simplified.txt for more information. */ +/* + * Copyright (c) 2012 Kevin Smith + * Licensed under the GNU General Public License v3. + * See Documentation/Licenses/GPLv3.txt for more information. + */ + #pragma once #include @@ -16,7 +22,7 @@ namespace Swift { ReplaceSerializer() : GenericPayloadSerializer() {} virtual std::string serializePayload(boost::shared_ptr replace) const { - return ""; + return ""; } }; } diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/ReplaceSerializerTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/ReplaceSerializerTest.cpp index 3d054cc..70f351c 100644 --- a/Swiften/Serializer/PayloadSerializers/UnitTest/ReplaceSerializerTest.cpp +++ b/Swiften/Serializer/PayloadSerializers/UnitTest/ReplaceSerializerTest.cpp @@ -4,6 +4,12 @@ * See Documentation/Licenses/BSD-simplified.txt for more information. */ +/* + * Copyright (c) 2012 Kevin Smith + * Licensed under the GNU General Public License v3. + * See Documentation/Licenses/GPLv3.txt for more information. + */ + #include #include @@ -23,7 +29,7 @@ class ReplaceSerializerTest: public CppUnit::TestFixture { ReplaceSerializer testling; boost::shared_ptr replace(new Replace()); replace->setID("bad1"); - CPPUNIT_ASSERT_EQUAL(std::string(""), testling.serialize(replace)); + CPPUNIT_ASSERT_EQUAL(std::string(""), testling.serialize(replace)); } }; -- cgit v0.10.2-6-g49f6