Commit c721eca5 authored by vvaltman's avatar vvaltman

Fixed problems with read mark. Deleted unused code

parent 48c07091
...@@ -1124,7 +1124,6 @@ static int get_history_on_answer (struct query *q UU) { ...@@ -1124,7 +1124,6 @@ static int get_history_on_answer (struct query *q UU) {
if (q->callback) { if (q->callback) {
((void (*)(void *, int, int, struct tgl_message **))q->callback) (q->callback_extra, 1, sn, ML); ((void (*)(void *, int, int, struct tgl_message **))q->callback) (q->callback_extra, 1, sn, ML);
} }
tfree (ML, sizeof (void *) * n);
/*for (i = n - 1; i >= 0; i--) { /*for (i = n - 1; i >= 0; i--) {
print_message (ML[i]); print_message (ML[i]);
...@@ -1132,6 +1131,8 @@ static int get_history_on_answer (struct query *q UU) { ...@@ -1132,6 +1131,8 @@ static int get_history_on_answer (struct query *q UU) {
if (sn > 0 && q->extra) { if (sn > 0 && q->extra) {
tgl_do_messages_mark_read (*(tgl_peer_id_t *)&(q->extra), ML[0]->id, 0, 0); tgl_do_messages_mark_read (*(tgl_peer_id_t *)&(q->extra), ML[0]->id, 0, 0);
} }
tfree (ML, sizeof (void *) * n);
return 0; return 0;
} }
...@@ -3026,7 +3027,6 @@ void tgl_do_create_group_chat (tgl_peer_id_t id, char *chat_topic, void (*callba ...@@ -3026,7 +3027,6 @@ void tgl_do_create_group_chat (tgl_peer_id_t id, char *chat_topic, void (*callba
} }
/* }}} */ /* }}} */
/* {{{ Delete msg */ /* {{{ Delete msg */
static int delete_msg_on_answer (struct query *q UU) { static int delete_msg_on_answer (struct query *q UU) {
......
...@@ -649,7 +649,7 @@ void tglf_fetch_message_short (struct tgl_message *M) { ...@@ -649,7 +649,7 @@ void tglf_fetch_message_short (struct tgl_message *M) {
//tglu_fetch_seq (); //tglu_fetch_seq ();
fetch_int (); fetch_int ();
bl_do_create_message_text (id, from_id, TGL_PEER_USER, to_id, date, 0, l, s); bl_do_create_message_text (id, from_id, TGL_PEER_USER, to_id, date, 1, l, s);
} else { } else {
fetch_int (); // id fetch_int (); // id
fetch_int (); // from_id fetch_int (); // from_id
...@@ -679,7 +679,7 @@ void tglf_fetch_message_short_chat (struct tgl_message *M) { ...@@ -679,7 +679,7 @@ void tglf_fetch_message_short_chat (struct tgl_message *M) {
//tglu_fetch_seq (); //tglu_fetch_seq ();
fetch_int (); fetch_int ();
bl_do_create_message_text (id, from_id, TGL_PEER_CHAT, to_id, date, 0, l, s); bl_do_create_message_text (id, from_id, TGL_PEER_CHAT, to_id, date, 1, l, s);
} else { } else {
fetch_int (); // id fetch_int (); // id
fetch_int (); // from_id fetch_int (); // from_id
......
This diff is collapsed.
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