summaryrefslogtreecommitdiffstats
blob: 46bc9c505a223eeff48b9f4c2f3339abc6c55e0d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/*
 * Copyright (c) 2011-2016 Isode Limited.
 * All rights reserved.
 * See the COPYING file for more information.
 */

#include <Swiften/Parser/PayloadParsers/MUCDestroyPayloadParser.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());
}

}