From 4c34c9623735cdd7d11c333e54ad8723abb1be8b Mon Sep 17 00:00:00 2001 From: Florian Scheibner Date: Thu, 12 Nov 2015 14:27:07 +0100 Subject: Fix getMessages call do not request "result" subitem twice --- src/Api.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/Api.cpp b/src/Api.cpp index 7e05621..9c8259f 100644 --- a/src/Api.cpp +++ b/src/Api.cpp @@ -246,7 +246,7 @@ vector Api::getUpdates(int32_t offset, int32_t limit, int32_t timeo if (timeout) { args.push_back(HttpReqArg("timeout", timeout)); } - return TgTypeParser::getInstance().parseJsonAndGetArray(&TgTypeParser::parseJsonAndGetUpdate, sendRequest("getUpdates", args), "result"); + return TgTypeParser::getInstance().parseJsonAndGetArray(&TgTypeParser::parseJsonAndGetUpdate, sendRequest("getUpdates", args)); } void Api::setWebhook(const string& url) const { -- cgit v1.2.3 From 2f857ce94ae9fe80bb0d0bd96aa40e262a24f30a Mon Sep 17 00:00:00 2001 From: Florian Scheibner Date: Thu, 12 Nov 2015 14:29:42 +0100 Subject: Remove leading \r\n\r\n before actual json string --- src/net/HttpParser.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/net/HttpParser.cpp b/src/net/HttpParser.cpp index 7c4f9e2..4b57bc1 100644 --- a/src/net/HttpParser.cpp +++ b/src/net/HttpParser.cpp @@ -196,11 +196,15 @@ string HttpParser::parseHttp(bool isRequest, const string& data, map