Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/majn/tgl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorV V <vvaltman@aurum>2016-03-23 14:42:06 +0300
committerV V <vvaltman@aurum>2016-03-23 14:42:06 +0300
commitffb04caca71de0cddf28cd33a4575922900a59ed (patch)
tree343113d3c3787193b7a0a689bbe9a641c4e1f6bf /structures.c
parentcec82849cb49405507b498d8a7fa25a7b55e68d0 (diff)
tgl: fix
Diffstat (limited to 'structures.c')
-rw-r--r--structures.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/structures.c b/structures.c
index e87680d..3ccdfc0 100644
--- a/structures.c
+++ b/structures.c
@@ -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));
@@ -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");