diff options
Diffstat (limited to 'Swiften/Parser/PayloadParsers/ChatStateParser.cpp')
-rw-r--r-- | Swiften/Parser/PayloadParsers/ChatStateParser.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/Swiften/Parser/PayloadParsers/ChatStateParser.cpp b/Swiften/Parser/PayloadParsers/ChatStateParser.cpp index bd5ecbe..75ec699 100644 --- a/Swiften/Parser/PayloadParsers/ChatStateParser.cpp +++ b/Swiften/Parser/PayloadParsers/ChatStateParser.cpp @@ -12,26 +12,26 @@ ChatStateParser::ChatStateParser() : level_(0) { } void ChatStateParser::handleStartElement(const std::string& element, const std::string&, const AttributeMap&) { - if (level_ == 0) { - ChatState::ChatStateType state = ChatState::Active; - if (element == "active") { - state = ChatState::Active; - } else if (element == "composing") { - state = ChatState::Composing; - } else if (element == "inactive") { - state = ChatState::Inactive; - } else if (element == "paused") { - state = ChatState::Paused; - } else if (element == "gone") { - state = ChatState::Gone; - } - getPayloadInternal()->setChatState(state); - } - ++level_; + if (level_ == 0) { + ChatState::ChatStateType state = ChatState::Active; + if (element == "active") { + state = ChatState::Active; + } else if (element == "composing") { + state = ChatState::Composing; + } else if (element == "inactive") { + state = ChatState::Inactive; + } else if (element == "paused") { + state = ChatState::Paused; + } else if (element == "gone") { + state = ChatState::Gone; + } + getPayloadInternal()->setChatState(state); + } + ++level_; } void ChatStateParser::handleEndElement(const std::string&, const std::string&) { - --level_; + --level_; } void ChatStateParser::handleCharacterData(const std::string&) { |