fixed reply_id in json and lua
This commit is contained in:
parent
2bfcbf0ad0
commit
e7d7bc5776
@ -431,7 +431,10 @@ json_t *json_pack_message (struct tgl_message *M) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (M->reply_id) {
|
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) {
|
if (M->flags & TGLMF_MENTION) {
|
||||||
|
5
lua-tg.c
5
lua-tg.c
@ -482,7 +482,10 @@ void push_message (struct tgl_message *M) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (M->reply_id) {
|
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) {
|
if (M->flags & TGLMF_MENTION) {
|
||||||
|
Loading…
Reference in New Issue
Block a user