From bcf222b53db2199cb6c784ac8c5b7105d794b6c9 Mon Sep 17 00:00:00 2001 From: bodqhrohro Date: Wed, 27 Nov 2019 00:14:06 +0200 Subject: Fetch user info and chats on successful authorization --- telegram/client.go | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'telegram/client.go') diff --git a/telegram/client.go b/telegram/client.go index 072f4b9..6a738af 100644 --- a/telegram/client.go +++ b/telegram/client.go @@ -36,12 +36,16 @@ func stringToLogConstant(c string) int32 { type Client struct { client *client.Client authorizer *clientAuthorizer - xmpp *xmpp.Component - jid string parameters *client.TdlibParameters - Session *persistence.Session - online bool logVerbosity client.Option + me *client.User + + xmpp *xmpp.Component + jid string + Session *persistence.Session + + ready chan bool + online bool } // NewClient instantiates a Telegram App @@ -84,6 +88,7 @@ func NewClient(conf config.TelegramConfig, jid string, component *xmpp.Component jid: jid, Session: session, logVerbosity: logVerbosity, + ready: make(chan bool), }, nil } -- cgit v1.2.3