From 5e59ff40e42d91c0e5fba059b9ab5f1d3d1bb9e5 Mon Sep 17 00:00:00 2001 From: Trumeet Date: Wed, 10 Mar 2021 18:12:27 -0800 Subject: feat: use int64 to store Telegram User ID --- tg/tg.c | 2 +- tg/tg.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tg/tg.c b/tg/tg.c index 6ee74a3..1701c34 100644 --- a/tg/tg.c +++ b/tg/tg.c @@ -73,7 +73,7 @@ TGUser *_tg_user_parse(json_object *json) json_object *obj; if(json_object_object_get_ex(json, "id", &obj)) - user->id = json_object_get_int(obj); + user->id = json_object_get_int64(obj); if(json_object_object_get_ex(json, "first_name", &obj)) user->first_name = json_object_get_string(obj); if(json_object_object_get_ex(json, "last_name", &obj)) diff --git a/tg/tg.h b/tg/tg.h index b9ef91c..09d0d0e 100644 --- a/tg/tg.h +++ b/tg/tg.h @@ -23,7 +23,7 @@ typedef struct tg_resp { } TGResp; typedef struct tg_user { - int32_t id; + int64_t id; const char *first_name; // Ownership: json const char *last_name; // Ownership: json const char *username; // Ownership: json -- cgit v1.2.3