Commit 83972316 authored by Vysheng's avatar Vysheng

Fixed read of notify settings

parent ac882621
......@@ -74,7 +74,8 @@
#define CODE_ping_delay_disconnect 0xf3427b8c
#define CODE_gzip_packed 0x3072cfa1
#define CODE_input_peer_notify_settings_old 0x3cf4b1be
#define CODE_peer_notify_settings_old 0xddbcd4a5
/* not really a limit, for struct encrypted_message only */
// #define MAX_MESSAGE_INTS 16384
#define MAX_MESSAGE_INTS 1048576
......
......@@ -271,14 +271,21 @@ void fetch_chat (struct chat *C) {
void fetch_notify_settings (void) {
unsigned x = fetch_int ();
assert (x == CODE_peer_notify_settings || x == CODE_peer_notify_settings_empty);
if (x == CODE_peer_notify_settings) {
assert (x == CODE_peer_notify_settings || x == CODE_peer_notify_settings_empty || x == CODE_peer_notify_settings_old);
if (x == CODE_peer_notify_settings_old) {
fetch_int (); // mute_until
int l = prefetch_strlen ();
fetch_str (l);
fetch_bool (); // show_previews
fetch_int (); // peer notify events
}
if (x == CODE_peer_notify_settings) {
fetch_int (); // mute_until
int l = prefetch_strlen ();
fetch_str (l);
fetch_bool (); // show_previews
fetch_int (); // events_mask
}
}
void fetch_chat_full (struct chat *C) {
......
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