diff --git a/internal/tg/client.go b/internal/tg/client.go index cc6b820..9b01f02 100644 --- a/internal/tg/client.go +++ b/internal/tg/client.go @@ -17,10 +17,12 @@ func New(appID int, appHash, sessionPath string) *Client { } func (c *Client) T() *telegram.Client { - return telegram.NewClient(c.appID, c.appHash, telegram.Options{ + opts := telegram.Options{ SessionStorage: &telegram.FileSessionStorage{ Path: c.sessionPath, }, NoUpdates: true, - }) + } + opts, _ = telegram.OptionsFromEnvironment(opts) + return telegram.NewClient(c.appID, c.appHash, opts) }