Fix panic on update without message

This commit is contained in:
2025-04-09 09:01:00 +03:00
parent 37e5555cf6
commit 4c205b528f
+4
View File
@@ -23,6 +23,10 @@ func GetStartCommandHandler(logger *logrus.Logger) bot.HandlerFunc {
func GetAnonymousMessagesHandler(logger *logrus.Logger, ownerChatId int) bot.HandlerFunc { func GetAnonymousMessagesHandler(logger *logrus.Logger, ownerChatId int) bot.HandlerFunc {
return func(ctx context.Context, b *bot.Bot, update *models.Update) { return func(ctx context.Context, b *bot.Bot, update *models.Update) {
if update.Message == nil {
return
}
params := &bot.CopyMessageParams{ params := &bot.CopyMessageParams{
ChatID: ownerChatId, ChatID: ownerChatId,
FromChatID: update.Message.Chat.ID, FromChatID: update.Message.Chat.ID,