Fixed bug in set_friend()
This commit is contained in:
parent
e57b7064bb
commit
80998dc7ec
4
binlog.c
4
binlog.c
@ -230,7 +230,6 @@ static int fetch_comb_binlog_user_set_phone (void *extra) {
|
||||
}
|
||||
U->user.phone = fetch_str_dup ();
|
||||
|
||||
|
||||
if (tgl_state.callback.user_update) {
|
||||
tgl_state.callback.user_update ((void *)U, TGL_UPDATE_PHONE);
|
||||
}
|
||||
@ -241,9 +240,6 @@ static int fetch_comb_binlog_user_set_friend (void *extra) {
|
||||
tgl_peer_id_t id = TGL_MK_USER (fetch_int ());
|
||||
tgl_peer_t *U = tgl_peer_get (id);
|
||||
assert (U);
|
||||
if (U->user.phone) {
|
||||
tfree_str (U->user.phone);
|
||||
}
|
||||
int friend = fetch_int ();
|
||||
if (friend) { U->flags |= FLAG_USER_CONTACT; }
|
||||
else { U->flags &= ~FLAG_USER_CONTACT; }
|
||||
|
@ -617,7 +617,7 @@ void print_user_info_gw (void *extra, int success, struct tgl_user *U) {
|
||||
push_color (COLOR_YELLOW);
|
||||
printf ("User ");
|
||||
print_user_name (U->id, C);
|
||||
printf (":\n");
|
||||
printf (" (#%d):\n", tgl_get_peer_id (U->id));
|
||||
printf ("\treal name: %s %s\n", U->real_first_name, U->real_last_name);
|
||||
printf ("\tphone: %s\n", U->phone);
|
||||
if (U->status.online > 0) {
|
||||
|
@ -69,7 +69,7 @@ void tglu_fetch_date (void) {
|
||||
}
|
||||
}
|
||||
|
||||
void tglu_fetch_seq (void) {
|
||||
/*void tglu_fetch_seq (void) {
|
||||
int x = fetch_int ();
|
||||
if (x > tgl_state.seq + 1) {
|
||||
vlogprintf (E_NOTICE, "Hole in seq: seq = %d, x = %d\n", tgl_state.seq, x);
|
||||
@ -79,7 +79,7 @@ void tglu_fetch_seq (void) {
|
||||
tgl_state.seq = x;
|
||||
bl_do_set_seq (tgl_state.seq);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
static void fetch_dc_option (void) {
|
||||
assert (fetch_int () == CODE_dc_option);
|
||||
|
Loading…
x
Reference in New Issue
Block a user