Skip to content

Commit e7d7bc5

Browse files
author
V V
committed
fixed reply_id in json and lua
1 parent 2bfcbf0 commit e7d7bc5

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

json-tg.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,10 @@ json_t *json_pack_message (struct tgl_message *M) {
431431
}
432432

433433
if (M->reply_id) {
434-
assert (json_object_set (res, "reply_id", json_integer (M->reply_id)) >= 0);
434+
tgl_message_id_t msg_id = M->permanent_id;
435+
msg_id.id = M->reply_id;
436+
437+
assert (json_object_set (res, "reply_id", json_string (print_permanent_msg_id (msg_id))) >= 0);
435438
}
436439

437440
if (M->flags & TGLMF_MENTION) {

lua-tg.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,10 @@ void push_message (struct tgl_message *M) {
482482
}
483483

484484
if (M->reply_id) {
485-
lua_add_num_field ("reply_id", M->reply_id);
485+
tgl_message_id_t msg_id = M->permanent_id;
486+
msg_id.id = M->reply_id;
487+
488+
lua_add_string_field ("reply_id", print_permanent_msg_id (msg_id));
486489
}
487490

488491
if (M->flags & TGLMF_MENTION) {

0 commit comments

Comments
 (0)