Skip to content

Commit

Permalink
tgl: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
V V committed Mar 23, 2016
1 parent cec8284 commit ffb04ca
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions structures.c
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ struct tgl_chat *tglf_fetch_alloc_chat (struct tgl_state *TLS, struct tl_ds_chat
if (DS_C->magic == CODE_chat_empty) {
return NULL;
}
if (DS_C->magic == CODE_channel) {
if (DS_C->magic == CODE_channel || DS_C->magic == CODE_channel_forbidden) {
return (void *)tglf_fetch_alloc_channel (TLS, DS_C);
}
tgl_peer_id_t chat_id = TGL_MK_CHAT (DS_LVAL (DS_C->id));
Expand Down Expand Up @@ -1548,7 +1548,8 @@ struct tgl_message *tglf_fetch_alloc_message (struct tgl_state *TLS, struct tl_d
tgl_peer_t *FF = NULL;

if (DS_M->fwd_from_id) {
FF = tgl_peer_get (TLS, tglf_fetch_peer_id (TLS, DS_M->fwd_from_id));
tgl_peer_id_t FF_id = tglf_fetch_peer_id (TLS, DS_M->fwd_from_id);
FF = tgl_peer_get (TLS, FF_id);
if (!FF) {
tgl_do_get_difference (TLS, 0, 0, 0);
vlogprintf (E_NOTICE, "unknown fwd_id\n");
Expand Down

0 comments on commit ffb04ca

Please sign in to comment.