From 589e8d7c452ca8c85d517092235c4d79820693ac Mon Sep 17 00:00:00 2001 From: mindrunner Date: Sun, 16 Mar 2014 13:44:44 +0100 Subject: [PATCH 1/2] telegram-cli gentoo ebuild pubkey fix --- gentoo/telegram-cli/telegram-cli-9999.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gentoo/telegram-cli/telegram-cli-9999.ebuild b/gentoo/telegram-cli/telegram-cli-9999.ebuild index bf8ed3d..17e3288 100644 --- a/gentoo/telegram-cli/telegram-cli-9999.ebuild +++ b/gentoo/telegram-cli/telegram-cli-9999.ebuild @@ -27,5 +27,5 @@ src_install() { newbin telegram telegram-cli insinto /etc/telegram-cli/ - newins tg.pub server.pub + newins tg-server.pub server.pub } From d5cfcb520f3dedcaef6aa66007dd4cd145b8fa4a Mon Sep 17 00:00:00 2001 From: vysheng Date: Thu, 20 Mar 2014 19:33:08 +0400 Subject: [PATCH 2/2] added layer 12 support --- constants.h | 3 ++- mtproto-common.h | 1 + queries.c | 9 +++++++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/constants.h b/constants.h index 54d7372..327885b 100644 --- a/constants.h +++ b/constants.h @@ -201,7 +201,7 @@ #define CODE_photos_photo 0x20212ca8 #define CODE_upload_file 0x96a18d5 #define CODE_dc_option 0x2ec2a43c -#define CODE_config 0x232d5905 +#define CODE_config 0x2e54dd74 #define CODE_nearest_dc 0x8e1a1775 #define CODE_help_app_update 0x8987f311 #define CODE_help_no_app_update 0xc45a6536 @@ -379,4 +379,5 @@ #define CODE_invoke_with_layer9 0x76715a63 #define CODE_invoke_with_layer10 0x39620c41 #define CODE_invoke_with_layer11 0xa6b88fdf +#define CODE_invoke_with_layer12 0xdda60d3c #endif diff --git a/mtproto-common.h b/mtproto-common.h index 340af62..619be74 100644 --- a/mtproto-common.h +++ b/mtproto-common.h @@ -78,6 +78,7 @@ #define CODE_input_peer_notify_settings_old 0x3cf4b1be #define CODE_peer_notify_settings_old 0xddbcd4a5 #define CODE_user_profile_photo_old 0x990d1493 +#define CODE_config_old 0x232d5905 #define CODE_msg_new_detailed_info 0x809db6df diff --git a/queries.c b/queries.c index e7ad64e..a4475dd 100644 --- a/queries.c +++ b/queries.c @@ -294,6 +294,7 @@ void work_timers (void) { } int max_chat_size; +int max_bcast_size; int want_dc_num; int new_dc_num; extern struct dc *DC_list[]; @@ -308,7 +309,7 @@ void out_random (int n) { int allow_send_linux_version; void do_insert_header (void) { - out_int (CODE_invoke_with_layer11); + out_int (CODE_invoke_with_layer12); out_int (CODE_init_connection); out_int (TG_APP_ID); if (allow_send_linux_version) { @@ -346,7 +347,8 @@ void fetch_dc_option (void) { } int help_get_config_on_answer (struct query *q UU) { - assert (fetch_int () == CODE_config); + unsigned op = fetch_int (); + assert (op == CODE_config || op == CODE_config_old); fetch_int (); unsigned test_mode = fetch_int (); @@ -364,6 +366,9 @@ int help_get_config_on_answer (struct query *q UU) { fetch_dc_option (); } max_chat_size = fetch_int (); + if (op == CODE_config) { + max_bcast_size = fetch_int (); + } if (verbosity >= 2) { logprintf ( "chat_size = %d\n", max_chat_size); }