You've already forked grok
fix
This commit is contained in:
3
main.go
3
main.go
@@ -62,7 +62,7 @@ type App struct {
|
||||
}
|
||||
|
||||
func (a *App) handleMessage(ctx context.Context, msg *tgbotapi.Message) error {
|
||||
if msg.Chat != nil {
|
||||
if msg.Chat == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -104,6 +104,7 @@ func (a *App) HandleUpdates(ctx context.Context) error {
|
||||
}
|
||||
|
||||
if upd.Message != nil {
|
||||
a.log.Info("new message", "chat", upd.Message.Chat)
|
||||
go func() {
|
||||
if err := a.handleMessage(ctx, upd.Message); err != nil {
|
||||
a.log.Error("handling message", "msg", upd.Message, "err", err)
|
||||
|
||||
Reference in New Issue
Block a user