diff --git a/Dockerfile b/Dockerfile index 8b24b7d..515d1ac 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,7 +20,7 @@ RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-w -s" -o birthdays-app ./cmd/ap FROM alpine:latest # Install CA certificates for HTTPS connections -RUN apk --no-cache add ca-certificates +RUN apk --no-cache --no-scripts add ca-certificates WORKDIR /app diff --git a/internal/bot/bot.go b/internal/bot/bot.go index 8bfb781..7cb8062 100644 --- a/internal/bot/bot.go +++ b/internal/bot/bot.go @@ -208,7 +208,12 @@ func (b *Bot) handleMessage(message *tgbotapi.Message) { return } - // Default response for non-commands + // For group chats, ignore non-command messages + if message.Chat.Type == "group" || message.Chat.Type == "supergroup" { + return + } + + // For private chats, send help prompt msg := tgbotapi.NewMessage(message.Chat.ID, "Hello! Send /help to see available commands.") if _, err := b.api.Send(msg); err != nil { logger.Error("BOT", "Failed to send message: %v", err)