diff options
author | bodqhrohro <bodqhrohro@gmail.com> | 2019-11-27 01:14:06 +0300 |
---|---|---|
committer | bodqhrohro <bodqhrohro@gmail.com> | 2019-11-27 01:14:06 +0300 |
commit | bcf222b53db2199cb6c784ac8c5b7105d794b6c9 (patch) | |
tree | 5ac884ce721f16defe68e7d41cc7173b38e6809b /telegram/client.go | |
parent | 9a292fba943529e7465c24cd3283d097fcb05764 (diff) |
Fetch user info and chats on successful authorization
Diffstat (limited to 'telegram/client.go')
-rw-r--r-- | telegram/client.go | 13 |
1 files changed, 9 insertions, 4 deletions
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 } |