diff --git a/json-tg.c b/json-tg.c index cdd42dd..cefb379 100644 --- a/json-tg.c +++ b/json-tg.c @@ -431,7 +431,10 @@ json_t *json_pack_message (struct tgl_message *M) { } if (M->reply_id) { - assert (json_object_set (res, "reply_id", json_integer (M->reply_id)) >= 0); + tgl_message_id_t msg_id = M->permanent_id; + msg_id.id = M->reply_id; + + assert (json_object_set (res, "reply_id", json_string (print_permanent_msg_id (msg_id))) >= 0); } if (M->flags & TGLMF_MENTION) { diff --git a/lua-tg.c b/lua-tg.c index 5f430a4..454a0a6 100644 --- a/lua-tg.c +++ b/lua-tg.c @@ -482,7 +482,10 @@ void push_message (struct tgl_message *M) { } if (M->reply_id) { - lua_add_num_field ("reply_id", M->reply_id); + tgl_message_id_t msg_id = M->permanent_id; + msg_id.id = M->reply_id; + + lua_add_string_field ("reply_id", print_permanent_msg_id (msg_id)); } if (M->flags & TGLMF_MENTION) {