From 4c205b528ff828e440180f380a37322e0bbf6bd1 Mon Sep 17 00:00:00 2001 From: nightnoryu Date: Wed, 9 Apr 2025 09:01:00 +0300 Subject: [PATCH] Fix panic on update without message --- pkg/app/handlers.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/app/handlers.go b/pkg/app/handlers.go index 3367797..48ed11c 100644 --- a/pkg/app/handlers.go +++ b/pkg/app/handlers.go @@ -23,6 +23,10 @@ func GetStartCommandHandler(logger *logrus.Logger) bot.HandlerFunc { func GetAnonymousMessagesHandler(logger *logrus.Logger, ownerChatId int) bot.HandlerFunc { return func(ctx context.Context, b *bot.Bot, update *models.Update) { + if update.Message == nil { + return + } + params := &bot.CopyMessageParams{ ChatID: ownerChatId, FromChatID: update.Message.Chat.ID,