Fix panic on update without message
This commit is contained in:
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user