diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index d55b48a..0000000 --- a/Dockerfile +++ /dev/null @@ -1,36 +0,0 @@ -FROM golang:1.25.6-alpine AS builder - -WORKDIR /src - -# Install git for module downloads -RUN apk add --no-cache git - -# Cache modules -COPY go.mod go.sum ./ -RUN go mod download - -# Copy source and build a static, stripped binary -COPY . . -RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \ - go build -ldflags="-s -w" -o /bin ./... - -FROM alpine:3.19 - -# Install CA certs for TLS -RUN apk add --no-cache ca-certificates - -# Set working directory where config.yaml will live -WORKDIR /opt - -# Copy binary into a standard location -COPY --from=builder /bin/telegram-join-approval-nuzzles /usr/local/bin/telegram-approval-join - -# Create a non-root user and group with specific UID:GID and set ownership -RUN addgroup -g 65532 app && \ - adduser -D -H -u 65532 -G app -s /sbin/nologin app -h /opt && \ - chown -R app:app /opt /usr/local/bin/telegram-approval-join - -# Run as the created non-root user -USER app:app - -ENTRYPOINT ["/usr/local/bin/telegram-approval-join"] \ No newline at end of file diff --git a/handlers/callbacks.go b/handlers/callbacks.go index feb7f56..59afc85 100644 --- a/handlers/callbacks.go +++ b/handlers/callbacks.go @@ -232,7 +232,8 @@ func (bot *Bot) sendCannedResponse(query *api.CallbackQuery, user *ExtendedChatJ } reason := utils.EscapeHTML(bot.Config.CannedDeclineResponses[respIdx]) - utils.SendMessage(bot.API, user.From.ID, 0, reason) + utils.SendMessage(bot.API, user.From.ID, 0, + fmt.Sprintf("Your join request was declined for the following reason:\n\n%s", reason)) // Extract user info from original message and reformat with the canned response userID, username, joinReason, declinedBy, declinedAt := utils.GetInfoFromMsg(query.Message.Text)