summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Parser/MessageParser.cpp')
-rw-r--r--Swiften/Parser/MessageParser.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/Swiften/Parser/MessageParser.cpp b/Swiften/Parser/MessageParser.cpp
index 5de0038..1dd7675 100644
--- a/Swiften/Parser/MessageParser.cpp
+++ b/Swiften/Parser/MessageParser.cpp
@@ -10,30 +10,30 @@
namespace Swift {
-MessageParser::MessageParser(PayloadParserFactoryCollection* factories) :
- GenericStanzaParser<Message>(factories) {
- GenericStanzaParser<Message>::getStanzaGeneric()->setType(Message::Normal);
+MessageParser::MessageParser(PayloadParserFactoryCollection* factories) :
+ GenericStanzaParser<Message>(factories) {
+ GenericStanzaParser<Message>::getStanzaGeneric()->setType(Message::Normal);
}
void MessageParser::handleStanzaAttributes(const AttributeMap& attributes) {
- boost::optional<std::string> type = attributes.getAttributeValue("type");
- if (type) {
- if (*type == "chat") {
- getStanzaGeneric()->setType(Message::Chat);
- }
- else if (*type == "error") {
- getStanzaGeneric()->setType(Message::Error);
- }
- else if (*type == "groupchat") {
- getStanzaGeneric()->setType(Message::Groupchat);
- }
- else if (*type == "headline") {
- getStanzaGeneric()->setType(Message::Headline);
- }
- else {
- getStanzaGeneric()->setType(Message::Normal);
- }
- }
+ boost::optional<std::string> type = attributes.getAttributeValue("type");
+ if (type) {
+ if (*type == "chat") {
+ getStanzaGeneric()->setType(Message::Chat);
+ }
+ else if (*type == "error") {
+ getStanzaGeneric()->setType(Message::Error);
+ }
+ else if (*type == "groupchat") {
+ getStanzaGeneric()->setType(Message::Groupchat);
+ }
+ else if (*type == "headline") {
+ getStanzaGeneric()->setType(Message::Headline);
+ }
+ else {
+ getStanzaGeneric()->setType(Message::Normal);
+ }
+ }
}
}