Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/gisho/tgl
Browse files Browse the repository at this point in the history
  • Loading branch information
kenorb committed Feb 2, 2019
2 parents 6fd4065 + 9b45c40 commit 72319cd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions queries-encrypted.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,12 @@ void tgl_do_send_encr_msg_action (struct tgl_state *TLS, struct tgl_message *M,
out_int (CODE_decrypted_message_action_abort_key);
out_long (M->action.exchange_id);
break;
case tgl_message_action_delete_messages:
out_int (CODE_decrypted_message_action_delete_messages);
out_int(CODE_vector);
out_int(1);
out_long (M->id);
break;
case tgl_message_action_noop:
out_int (CODE_decrypted_message_action_noop);
break;
Expand Down
7 changes: 7 additions & 0 deletions queries.c
Original file line number Diff line number Diff line change
Expand Up @@ -4178,6 +4178,13 @@ void tgl_do_delete_msg (struct tgl_state *TLS, tgl_message_id_t *_msg_id, void (
}
return;
}
struct tgl_message *M = tgl_message_get (TLS, id);
if (tgl_get_peer_type (M->to_id) == TGL_PEER_ENCR_CHAT) {
M->action.type=tgl_message_action_delete_messages;
M->flags |=TGLMF_SERVICE;
tgl_do_send_msg (TLS, M, 0, 0);
return;
}
clear_packet ();
if (msg_id.peer_type == TGL_PEER_CHANNEL) {
out_int (CODE_channels_delete_messages);
Expand Down

0 comments on commit 72319cd

Please sign in to comment.