fixed reply_id in json and lua

This commit is contained in:
V V 2016-01-05 23:27:19 +03:00
parent 2bfcbf0ad0
commit e7d7bc5776
2 changed files with 8 additions and 2 deletions

View File

@ -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) {

View File

@ -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) {