diff options
Diffstat (limited to 'Swiften/Parser/PayloadParsers/MUCInvitationPayloadParser.cpp')
-rw-r--r-- | Swiften/Parser/PayloadParsers/MUCInvitationPayloadParser.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Swiften/Parser/PayloadParsers/MUCInvitationPayloadParser.cpp b/Swiften/Parser/PayloadParsers/MUCInvitationPayloadParser.cpp index fa95af7..90590ee 100644 --- a/Swiften/Parser/PayloadParsers/MUCInvitationPayloadParser.cpp +++ b/Swiften/Parser/PayloadParsers/MUCInvitationPayloadParser.cpp @@ -1,4 +1,4 @@ /* - * Copyright (c) 2011 Kevin Smith + * Copyright (c) 2011-2014 Kevin Smith * Licensed under the GNU General Public License v3. * See Documentation/Licenses/GPLv3.txt for more information. @@ -6,6 +6,5 @@ #include <Swiften/Parser/PayloadParsers/MUCInvitationPayloadParser.h> - - +#include <Swiften/Parser/Tree/NullParserElement.h> namespace Swift { @@ -18,4 +17,6 @@ void MUCInvitationPayloadParser::handleTree(ParserElement::ref root) { invite->setReason(root->getAttributes().getAttribute("reason")); invite->setThread(root->getAttributes().getAttribute("thread")); + ParserElement::ref impromptuNode = root->getChild("impromptu", "http://swift.im/impromptu"); + invite->setIsImpromptu(!boost::dynamic_pointer_cast<NullParserElement>(impromptuNode)); } |