diff options
author | Oleg Morozenkov <omorozenkov@gmail.com> | 2016-03-16 13:04:25 +0300 |
---|---|---|
committer | Oleg Morozenkov <omorozenkov@gmail.com> | 2016-03-16 13:04:25 +0300 |
commit | 1ef44a4ac99c3107885bfaed89d74a1661394b8b (patch) | |
tree | 95cbeb61e1b2221c4f45c30728e4b9508046611c /src/TgTypeParser.cpp | |
parent | 3d6658234eeb0311914dff266c9e3131a170ce12 (diff) | |
parent | 2dcc7398d113a1a04a6682d76f85962e2c4f2fea (diff) |
Merge pull request #16 from flode/master
Fix crashes in group/supergroup
Diffstat (limited to 'src/TgTypeParser.cpp')
-rw-r--r-- | src/TgTypeParser.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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<int32_t>("id"); + result->id = data.get<int64_t>("id"); string type = data.get<string>("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<string>("first_name"); + result->firstName = data.get<string>("first_name", ""); result->lastName = data.get("last_name", ""); return result; |