From 865c0a933c4badb42d3089c45037d6f08402e68d Mon Sep 17 00:00:00 2001 From: V V Date: Sat, 10 Oct 2015 19:54:46 +0300 Subject: [PATCH] updated tgl --- loop.c | 2 +- lua-tg.c | 3 ++- tgl | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/loop.c b/loop.c index a7fffaa..0dd11cd 100644 --- a/loop.c +++ b/loop.c @@ -813,7 +813,7 @@ int loop (void) { if (disable_link_preview) { tgl_disable_link_preview (TLS); } - tgl_init (TLS); + assert (tgl_init (TLS) >= 0); /*if (binlog_enabled) { double t = tglt_get_double_time (); diff --git a/lua-tg.c b/lua-tg.c index 53de022..73c7889 100644 --- a/lua-tg.c +++ b/lua-tg.c @@ -227,9 +227,10 @@ void push_peer (tgl_peer_id_t id, tgl_peer_t *P) { lua_newtable (luaState); lua_add_string_field ("id", print_permanent_peer_id (P->id)); - lua_pushstring (luaState, "type"); + lua_pushstring (luaState, "peer_type"); push_tgl_peer_type (tgl_get_peer_type (P->id)); lua_settable (luaState, -3); + lua_add_num_field ("peer_id", tgl_get_peer_id (P->id)); if (!P || !(P->flags & TGLPF_CREATED)) { lua_pushstring (luaState, "print_name"); diff --git a/tgl b/tgl index 511860e..6467a94 160000 --- a/tgl +++ b/tgl @@ -1 +1 @@ -Subproject commit 511860ecf69f51e0a8f2e0617490f81e624e0fb2 +Subproject commit 6467a94ee3d9f69b6f23d66221f7bd0d58df7ac2