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>2015-10-16 15:53:34 +0300
committerV V <vvaltman@aurum>2015-10-16 15:53:34 +0300
commitf9534a2a09fe4c89c9fecfd412fd1bfd4bcda8d3 (patch)
tree4a91b37d50d29986b27986c3c59eb0fd3482b763 /structures.c
parent5b18232e9ba1ec696843710b851120a2653cc801 (diff)
fixed pfs structures. Added on_failed_login callback instead of assert
Diffstat (limited to 'structures.c')
-rw-r--r--structures.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/structures.c b/structures.c
index f7c5653..f8ab9b9 100644
--- a/structures.c
+++ b/structures.c
@@ -606,7 +606,7 @@ struct tgl_channel *tglf_fetch_alloc_channel (struct tgl_state *TLS, struct tl_d
tgl_peer_id_t chat_id = TGL_MK_CHANNEL (DS_LVAL (DS_C->id));
chat_id.access_hash = DS_LVAL (DS_C->access_hash);
-
+
struct tgl_channel *C = (void *)tgl_peer_get (TLS, chat_id);
if (!C) {
TLS->channels_allocated ++;
@@ -623,6 +623,11 @@ struct tgl_channel *tglf_fetch_alloc_channel (struct tgl_state *TLS, struct tl_d
if (!(flags & TGLCF_CREATED)) {
flags |= TGLCF_CREATE | TGLCF_CREATED;
}
+ if (DS_LVAL (DS_C->flags) & 0x80) {
+ flags |= TGLCHF_OFFICIAL;
+ } else {
+ flags &= ~TGLCHF_OFFICIAL;
+ }
bl_do_channel (TLS, tgl_get_peer_id (C->id),
DS_C->access_hash,