diff --git a/.drone.yml b/.drone.yml index fa555c6..b7f437d 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,36 +1,18 @@ kind: pipeline -type: docker name: default steps: - - name: build and push - image: docker:dind - volumes: - - name: docker.sock - path: /var/run - environment: - CI_REGISTRY: - from_secret: CI_REGISTRY - CI_REGISTRY_USER: - from_secret: CI_REGISTRY_USER - CI_REGISTRY_PASSWORD: - from_secret: CI_REGISTRY_PASSWORD - CI_APP_IMAGE: - from_secret: CI_APP_IMAGE - commands: - - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - - docker buildx build --push --platform linux/amd64 --tag $CI_APP_IMAGE --file Dockerfile . - when: - branch: - - master - -services: - name: docker - image: docker:dind - privileged: true - volumes: - - name: docker.sock - path: /var/run + image: plugins/docker + settings: + username: + from_secret: CI_REGISTRY_USER + password: + from_secret: CI_REGISTRY_PASSWORD + repo: + from_secret: CI_APP_IMAGE + tags: + - latest trigger: event: diff --git a/internal/handler/group/poll.go b/internal/handler/group/poll.go index 7190d57..0c6215f 100644 --- a/internal/handler/group/poll.go +++ b/internal/handler/group/poll.go @@ -42,9 +42,9 @@ func (h *Poll) Handle(wh telego.Update) error { } loc := h.Localizer(user.Language) _ = loc - if len(wh.Message.Entities) != 1 || - (len(wh.Message.Entities) == 1 && wh.Message.Entities[0].Type != telego.EntityTypeBotCommand) || - (len(wh.Message.Entities) == 1 && wh.Message.Entities[0].Offset != 0) { + if len(wh.Message.Entities) == 0 || + (len(wh.Message.Entities) > 0 && wh.Message.Entities[0].Type != telego.EntityTypeBotCommand) || + (len(wh.Message.Entities) > 0 && wh.Message.Entities[0].Offset != 0) { return nil }