From 2dcc7398d113a1a04a6682d76f85962e2c4f2fea Mon Sep 17 00:00:00 2001 From: Florian Scheibner Date: Wed, 16 Mar 2016 08:29:15 +0100 Subject: Fix crashes in group/supergroup --- src/TgTypeParser.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/TgTypeParser.cpp') diff --git a/src/TgTypeParser.cpp b/src/TgTypeParser.cpp index d84e2a1..db44eff 100644 --- a/src/TgTypeParser.cpp +++ b/src/TgTypeParser.cpp @@ -34,7 +34,7 @@ TgTypeParser& TgTypeParser::getInstance() { Chat::Ptr TgTypeParser::parseJsonAndGetChat(const ptree& data) const { Chat::Ptr result(new Chat); - result->id = data.get("id"); + result->id = data.get("id"); string type = data.get("type"); if (type == "private") { result->type = Chat::Type::Private; @@ -47,7 +47,7 @@ Chat::Ptr TgTypeParser::parseJsonAndGetChat(const ptree& data) const { } result->title = data.get("title", ""); result->username = data.get("username", ""); - result->firstName = data.get("first_name"); + result->firstName = data.get("first_name", ""); result->lastName = data.get("last_name", ""); return result; -- cgit v1.2.3