Skip to content

Commit

Permalink
connector/client: add more logging on Connect
Browse files Browse the repository at this point in the history
Signed-off-by: Sumner Evans <[email protected]>
  • Loading branch information
sumnerevans committed Dec 9, 2024
1 parent 964ea69 commit c8590ca
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/connector/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -470,10 +470,13 @@ func (t *TelegramClient) onAuthError(ctx context.Context, err error) {

func (t *TelegramClient) Connect(ctx context.Context) {
if !t.userLogin.Metadata.(*UserLoginMetadata).Session.HasAuthKey() {
zerolog.Ctx(ctx).Warn().Msg("user does not have an auth key, sending bad credentials state")
t.sendBadCredentialsOrUnknownError(ErrNoAuthKey)
return
}

zerolog.Ctx(ctx).Info().Int64("user_id", t.telegramUserID).Msg("Connecting client")

var err error
t.clientCtx, t.clientCancel, err = connectTelegramClient(ctx, t.client)
if err != nil {
Expand Down

0 comments on commit c8590ca

Please sign in to comment.