Skip to content

Commit

Permalink
More logs.
Browse files Browse the repository at this point in the history
  • Loading branch information
kak-tus committed Aug 27, 2023
1 parent 9897365 commit 6559257
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions telegram/newbie.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,8 @@ func (hdl *InstanceObj) newMembers(ctx context.Context, msg *tgbotapi.Message) e
defaultGroup := hdl.model.GetDefaultGroup()

for _, m := range msg.NewChatMembers {
hdl.oldLog.Infow("Newbie found, add messages",
"User", m.FirstName,
"Chat", msg.Chat.ID,
)
hdl.log.Info().Str("user", m.FirstName).Int64("chat", msg.Chat.ID).
Msg("newbie found, add messages")

err := hdl.stor.AddNewbieMessages(ctx, msg.Chat.ID, int(m.ID))
if err != nil {
Expand All @@ -100,10 +98,8 @@ func (hdl *InstanceObj) newMembers(ctx context.Context, msg *tgbotapi.Message) e
}

for _, newMember := range msg.NewChatMembers {
hdl.oldLog.Infow("Newbie found, send question",
"User", newMember.FirstName,
"Chat", msg.Chat.ID,
)
hdl.log.Info().Str("user", newMember.FirstName).Int64("chat", msg.Chat.ID).
Msg("newbie found, send question")

qID := rand.Intn(len(quest))

Expand Down

0 comments on commit 6559257

Please sign in to comment.