Skip to content

Commit

Permalink
Log full in message to debug purposes.
Browse files Browse the repository at this point in the history
  • Loading branch information
kak-tus committed Nov 7, 2023
1 parent c11f33e commit e3330eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions telegram/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ https://github.com/kak-tus/irma_bot
const botNameTemplate = "__IRMA_BOT_NAME__"

func (hdl *InstanceObj) process(ctx context.Context, msg tgbotapi.Update) error {
hdl.log.Debug().Interface("msg", msg).Msg("got message")

if msg.Message != nil {
return hdl.processMsg(ctx, msg.Message)
} else if msg.CallbackQuery != nil {
Expand All @@ -46,8 +48,6 @@ func (hdl *InstanceObj) process(ctx context.Context, msg tgbotapi.Update) error
}

func (hdl *InstanceObj) processMsg(ctx context.Context, msg *tgbotapi.Message) error {
hdl.log.Debug().Interface("msg", msg).Msg("got message")

textWithBotName := strings.ReplaceAll(usageText, botNameTemplate, hdl.cnf.BotName)

if msg.Chat.IsPrivate() {
Expand Down

0 comments on commit e3330eb

Please sign in to comment.