summaryrefslogtreecommitdiffstats
blob: a8d29d02873667f3de1258a468301c27e5615f9f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/*
 * Copyright (c) 2011 Kevin Smith
 * Licensed under the GNU General Public License v3.
 * See Documentation/Licenses/GPLv3.txt for more information.
 */

#include <Swiften/Parser/PayloadParsers/MUCDestroyPayloadParser.h>

#include <Swiften/Base/foreach.h>

namespace Swift {

void MUCDestroyPayloadParser::handleTree(ParserElement::ref root) {
	std::string ns = root->getNamespace();
	std::string jid = root->getAttributes().getAttribute("jid");
	if (!jid.empty()) {
		getPayloadInternal()->setNewVenue(JID(jid));
	}
	getPayloadInternal()->setReason(root->getChild("reason", ns)->getText());
}

}