From 728e758eee9b22328abc6e75f6cef7e7197be0f0 Mon Sep 17 00:00:00 2001 From: kukin-konstantin Date: Fri, 30 Dec 2016 15:05:22 +0300 Subject: fix send Video, Voice etc --- src/TgTypeParser.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/TgTypeParser.cpp') 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("title", ""); string tPnoneNumber = data.get("phone_number", ""); - if (tMessageText != std::string("")) { + if (!tMessageText.empty()) { result = static_pointer_cast(parseJsonAndGetInputTextMessageContent(data)); - } else if (tTitle !=std::string("")) { + } else if (!tTitle.empty()) { result = static_pointer_cast(parseJsonAndGetInputVenueMessageContent(data)); } else if (tLatitude != 1000) { result = static_pointer_cast(parseJsonAndGetInputLocationMessageContent(data)); - } else if (tPnoneNumber!= std::string("")) { + } else if (!tPnoneNumber.empty()) { result = static_pointer_cast(parseJsonAndGetInputContactMessageContent(data)); } -- cgit v1.2.3