diff options
Diffstat (limited to 'Swiften')
-rw-r--r-- | Swiften/MUC/MUC.cpp | 9 | ||||
-rw-r--r-- | Swiften/MUC/MUC.h | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/Swiften/MUC/MUC.cpp b/Swiften/MUC/MUC.cpp index 4b3960f..59917f9 100644 --- a/Swiften/MUC/MUC.cpp +++ b/Swiften/MUC/MUC.cpp @@ -15,6 +15,7 @@ #include <Swiften/Client/StanzaChannel.h> #include <Swiften/Queries/IQRouter.h> #include <Swiften/Elements/Form.h> +#include <Swiften/Elements/Message.h> #include <Swiften/Elements/IQ.h> #include <Swiften/Elements/MUCUserPayload.h> #include <Swiften/Elements/MUCAdminPayload.h> @@ -235,6 +236,14 @@ void MUC::handleKickResponse(MUCAdminPayload::ref /*unused*/, ErrorPayload::ref } } +void MUC::changeSubject(const std::string& subject) { + Message::ref message = boost::make_shared<Message>(); + message->setSubject(subject); + message->setType(Message::Groupchat); + message->setTo(ownMUCJID.toBare()); + stanzaChannel->sendMessage(message); +} + //FIXME: Recognise Topic changes //TODO: Invites(direct/mediated) diff --git a/Swiften/MUC/MUC.h b/Swiften/MUC/MUC.h index 41dbc4a..26247c5 100644 --- a/Swiften/MUC/MUC.h +++ b/Swiften/MUC/MUC.h @@ -56,6 +56,7 @@ namespace Swift { MUCOccupant getOccupant(const std::string& nick); bool hasOccupant(const std::string& nick); void kickUser(const JID& jid); + void changeSubject(const std::string& subject); public: boost::signal<void (const std::string& /*nick*/)> onJoinComplete; boost::signal<void (ErrorPayload::ref)> onJoinFailed; |