summaryrefslogtreecommitdiff
path: root/protocols/WhatsApp/src/WhatsAPI++/FMessage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/WhatsApp/src/WhatsAPI++/FMessage.cpp')
-rw-r--r--protocols/WhatsApp/src/WhatsAPI++/FMessage.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/protocols/WhatsApp/src/WhatsAPI++/FMessage.cpp b/protocols/WhatsApp/src/WhatsAPI++/FMessage.cpp
index 0eca3aeef7..c80e44c657 100644
--- a/protocols/WhatsApp/src/WhatsAPI++/FMessage.cpp
+++ b/protocols/WhatsApp/src/WhatsAPI++/FMessage.cpp
@@ -105,10 +105,11 @@ std::string Key::toString() {
}
-unsigned char FMessage::getMessage_WA_Type(std::string* type) {
- if ((type == NULL) || (type->length() == 0))
+unsigned char FMessage::getMessage_WA_Type(const std::string& type) {
+ if (type.empty())
return WA_TYPE_UNDEFINED;
- std::string typeLower = *type;
+
+ std::string typeLower = type;
std::transform(typeLower.begin(), typeLower.end(), typeLower.begin(), ::tolower);
if (typeLower.compare("system") == 0)
return WA_TYPE_SYSTEM;