From efaf601e8552574f9f12ae97d668381f5a916b22 Mon Sep 17 00:00:00 2001 From: levlam Date: Thu, 8 Apr 2021 17:44:55 +0300 Subject: [PATCH] Don't store empty chat_type. --- telegram-bot-api/Client.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/telegram-bot-api/Client.cpp b/telegram-bot-api/Client.cpp index 706ce3c..d3b4c39 100644 --- a/telegram-bot-api/Client.cpp +++ b/telegram-bot-api/Client.cpp @@ -1941,7 +1941,9 @@ class Client::JsonInlineQuery : public Jsonable { return ""; } }(); - object("chat_type", chat_type); + if (chat_type[0] != '\0') { + object("chat_type", chat_type); + } } object("query", query_); object("offset", offset_);