Skip to content

Commit

Permalink
chore(api): more logging
Browse files Browse the repository at this point in the history
  • Loading branch information
ernado committed Apr 18, 2024
1 parent 1cbb6f0 commit 78a9e89
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/api/badge.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,14 @@ func (s Server) GetTelegramBadge(ctx context.Context, params oas.GetTelegramBadg
zap.String("about", chanFull.About),
)
for _, chat := range full.Chats {
s.lg.Info("Chat", zap.Any("chat", chat))
switch c := chat.(type) {
case *tg.Chat:
members = c.ParticipantsCount
case *tg.Channel:
members = c.ParticipantsCount
default:
s.lg.Warn("unexpected chat type",
s.lg.Warn("Unexpected chat type",
zap.String("type", fmt.Sprintf("%T", chat)),
)
}
Expand Down

0 comments on commit 78a9e89

Please sign in to comment.