diff --git a/interface.c b/interface.c index d006561..0957832 100644 --- a/interface.c +++ b/interface.c @@ -347,6 +347,24 @@ void interpreter (char *line UU) { } do_get_history (Peers[index], limit); } + } else if (!memcmp (line, "help", 4)) { + print_start (); + push_color (COLOR_YELLOW); + printf ( + "help - prints this help\n" + "msg Text - sends message to this peer\n" + "contact_list - prints info about users in your contact list\n" + "stats - just for debugging \n" + "history [limit] - prints history (and marks it as read). Default limit = 40\n" + "dialog_list - prints info about your dialogs\n" + "send_photo - sends photo to peer\n" + "send_video - sends video to peer\n" + "send_text - sends text file as plain messages\n" + "chat_info - prints info about chat\n" + ); + pop_color (); + print_end (); + printf ("\033[1K\033H"); } } diff --git a/queries.c b/queries.c index 15a137d..6423f26 100644 --- a/queries.c +++ b/queries.c @@ -655,7 +655,11 @@ void do_get_history (union user_chat *U, int limit) { } int get_dialogs_on_answer (struct query *q UU) { - assert (fetch_int () == CODE_messages_dialogs); + unsigned x = fetch_int (); + assert (x == CODE_messages_dialogs || x == CODE_messages_dialogs_slice); + if (x == CODE_messages_dialogs_slice) { + fetch_int (); // total_count + } assert (fetch_int () == CODE_vector); int n, i; n = fetch_int ();