Commit b5bf72f1 authored by vysheng's avatar vysheng

Merge github.com:vysheng/tg

parents 8d6dff61 d5cfcb52
......@@ -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
......@@ -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
}
......@@ -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
......
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment