summaryrefslogtreecommitdiff
path: root/src/TgTypeParser.cpp
diff options
context:
space:
mode:
authorkukin-konstantin <kukin.konstantin@gmail.com>2016-12-30 15:05:22 +0300
committerkukin-konstantin <kukin.konstantin@gmail.com>2016-12-30 15:05:22 +0300
commit728e758eee9b22328abc6e75f6cef7e7197be0f0 (patch)
tree0fb465d5212edaef9e808fee28bdd84d60e849cd /src/TgTypeParser.cpp
parenta071ebee5b2f6c418e7f3916bd6f50b152aaf300 (diff)
fix send Video, Voice etc
Diffstat (limited to 'src/TgTypeParser.cpp')
-rw-r--r--src/TgTypeParser.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/TgTypeParser.cpp b/src/TgTypeParser.cpp
index 20b8ea2..45124e2 100644
--- a/src/TgTypeParser.cpp
+++ b/src/TgTypeParser.cpp
@@ -1411,13 +1411,13 @@ InputMessageContent::Ptr TgTypeParser::parseJsonAndGetInputMessageContent(const
string tTitle = data.get<string>("title", "");
string tPnoneNumber = data.get<string>("phone_number", "");
- if (tMessageText != std::string("")) {
+ if (!tMessageText.empty()) {
result = static_pointer_cast<InputMessageContent>(parseJsonAndGetInputTextMessageContent(data));
- } else if (tTitle !=std::string("")) {
+ } else if (!tTitle.empty()) {
result = static_pointer_cast<InputMessageContent>(parseJsonAndGetInputVenueMessageContent(data));
} else if (tLatitude != 1000) {
result = static_pointer_cast<InputMessageContent>(parseJsonAndGetInputLocationMessageContent(data));
- } else if (tPnoneNumber!= std::string("")) {
+ } else if (!tPnoneNumber.empty()) {
result = static_pointer_cast<InputMessageContent>(parseJsonAndGetInputContactMessageContent(data));
}