fix: issues
This commit is contained in:
@@ -20,16 +20,10 @@ type TClient struct {
|
||||
logger *zap.Logger
|
||||
api *tg.Client
|
||||
|
||||
downloadMedia bool
|
||||
|
||||
waitLogin chan error
|
||||
block chan struct{}
|
||||
}
|
||||
|
||||
// func (t *TClient) Close() {
|
||||
// t.block <- struct{}{}
|
||||
// }
|
||||
|
||||
func NewClient(logger *zap.Logger, config *config.Config) *TClient {
|
||||
c := &TClient{
|
||||
Config: config,
|
||||
@@ -46,11 +40,6 @@ func NewClient(logger *zap.Logger, config *config.Config) *TClient {
|
||||
return c
|
||||
}
|
||||
|
||||
func (t *TClient) WithMedia() *TClient {
|
||||
t.downloadMedia = true
|
||||
return t
|
||||
}
|
||||
|
||||
func (t *TClient) Login(ctx context.Context) error {
|
||||
t.logger.Info("login phone", zap.String("phone", t.Config.Phone))
|
||||
flow := auth.NewFlow(Terminal{PhoneNumber: client.Config.Phone}, auth.SendCodeOptions{})
|
||||
|
||||
Reference in New Issue
Block a user