Skip to content

Commit

Permalink
improve logging
Browse files Browse the repository at this point in the history
  • Loading branch information
mazzz1y committed Sep 19, 2023
1 parent d754da8 commit 01a7143
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/bot/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func (b *Bot) redactionHandler(source mautrix.EventSource, evt *event.Event) {
reqID, ok := user.getActiveRequestID()
if ok && reqID == evt.Redacts.String() {
user.cancelRequestContext(reqID)
l.Debug().Msg("message cancelled")
l.Debug().Msg("request cancelled")
}
}

Expand All @@ -67,10 +67,10 @@ func (b *Bot) messageHandler(source mautrix.EventSource, evt *event.Event) {
l.Debug().Msg("forbidden")
return
}

l.Debug().Msg("received request, processing")
if user.getLastMsgTime().Add(b.historyExpire).Before(time.Now()) {
l.Debug().Msg("history expired, resetting before processing")
user.history.reset()
l.Debug().Msg("history expired, resetting")
}

go func() {
Expand Down

0 comments on commit 01a7143

Please sign in to comment.