summaryrefslogtreecommitdiff
path: root/src/TgTypeParser.cpp
diff options
context:
space:
mode:
authorFlorian Scheibner <flo.de@hotmail.de>2016-03-16 08:29:15 +0100
committerFlorian Scheibner <flo.de@hotmail.de>2016-03-16 08:29:15 +0100
commit2dcc7398d113a1a04a6682d76f85962e2c4f2fea (patch)
tree95cbeb61e1b2221c4f45c30728e4b9508046611c /src/TgTypeParser.cpp
parent3d6658234eeb0311914dff266c9e3131a170ce12 (diff)
Fix crashes in group/supergroup
Diffstat (limited to 'src/TgTypeParser.cpp')
-rw-r--r--src/TgTypeParser.cpp4
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;