updated tgl
This commit is contained in:
parent
8bcd9378a0
commit
443412cded
@ -639,9 +639,9 @@ void do_history (int arg_num, struct arg args[], struct in_ev *ev) {
|
||||
}
|
||||
|
||||
void do_dialog_list (int arg_num, struct arg args[], struct in_ev *ev) {
|
||||
assert (arg_num == 0);
|
||||
assert (arg_num <= 2);
|
||||
if (ev) { ev->refcnt ++; }
|
||||
tgl_do_get_dialog_list (TLS, print_dialog_list_gw, ev);
|
||||
tgl_do_get_dialog_list (TLS, args[0].num != NOT_FOUND ? args[0].num : 100, args[1].num != NOT_FOUND ? args[1].num : 0, print_dialog_list_gw, ev);
|
||||
}
|
||||
|
||||
void do_send_photo (int arg_num, struct arg args[], struct in_ev *ev) {
|
||||
@ -1160,7 +1160,7 @@ struct command commands[] = {
|
||||
{"create_secret_chat", {ca_user, ca_none}, do_create_secret_chat, "create_secret_chat <user>\tStarts creation of secret chat"},
|
||||
{"del_contact", {ca_user, ca_none}, do_del_contact, "del_contact <user>\tDeletes contact from contact list"},
|
||||
{"delete_msg", {ca_number, ca_none}, do_delete_msg, "delete_msg <msg-id>\tDeletes message"},
|
||||
{"dialog_list", {ca_none}, do_dialog_list, "dialog_list\tList of last conversations"},
|
||||
{"dialog_list", {ca_number | ca_optional, ca_number | ca_optional, ca_none}, do_dialog_list, "dialog_list [limit=100] [offset=0]\tList of last conversations"},
|
||||
{"export_card", {ca_none}, do_export_card, "export_card\tPrints card that can be imported by another user with import_card method"},
|
||||
{"fwd", {ca_peer, ca_number, ca_none}, do_fwd, "fwd <peer> <msg-id>\tForwards message to peer. Forward to secret chats is forbidden"},
|
||||
{"fwd_media", {ca_peer, ca_number, ca_none}, do_fwd_media, "fwd <peer> <msg-id>\tForwards message media to peer. Forward to secret chats is forbidden. Result slightly differs from fwd"},
|
||||
|
2
loop.c
2
loop.c
@ -647,7 +647,7 @@ void dlist_cb (struct tgl_state *TLSR, void *callback_extra, int success, int si
|
||||
void on_started (struct tgl_state *TLS) {
|
||||
if (wait_dialog_list) {
|
||||
wait_dialog_list = 0;
|
||||
tgl_do_get_dialog_list (TLS, dlist_cb, 0);
|
||||
tgl_do_get_dialog_list (TLS, 100, 0, dlist_cb, 0);
|
||||
}
|
||||
#ifdef USE_LUA
|
||||
lua_diff_end ();
|
||||
|
2
lua-tg.c
2
lua-tg.c
@ -873,7 +873,7 @@ void lua_do_all (void) {
|
||||
tgl_do_update_contact_list (TLS, lua_contact_list_cb, lua_ptr[p ++]);
|
||||
break;
|
||||
case lq_dialog_list:
|
||||
tgl_do_get_dialog_list (TLS, lua_dialog_list_cb, lua_ptr[p ++]);
|
||||
tgl_do_get_dialog_list (TLS, 100, 0, lua_dialog_list_cb, lua_ptr[p ++]);
|
||||
break;
|
||||
case lq_msg:
|
||||
tgl_do_send_message (TLS, ((tgl_peer_t *)lua_ptr[p + 1])->id, lua_ptr[p + 2], strlen (lua_ptr[p + 2]), lua_msg_cb, lua_ptr[p]);
|
||||
|
2
tgl
2
tgl
@ -1 +1 @@
|
||||
Subproject commit 01a4d84afefc8aabbb2785e84c1f5d91b55d3e25
|
||||
Subproject commit 58c5c6a57272773df63e285162536f4ce53c5230
|
Loading…
x
Reference in New Issue
Block a user