diff --git a/internal/handler/group/poll.go b/internal/handler/group/poll.go index 0c6215f..996ceb4 100644 --- a/internal/handler/group/poll.go +++ b/internal/handler/group/poll.go @@ -41,18 +41,21 @@ func (h *Poll) Handle(wh telego.Update) error { return err } loc := h.Localizer(user.Language) - _ = loc 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 } + taskInfo := strings.TrimSpace(wh.Message.Text[wh.Message.Entities[0].Length:]) + if taskInfo == "" && wh.Message.ReplyToMessage != nil { + taskInfo = wh.Message.ReplyToMessage.Text + } + var ( taskID int canRedmine bool ) - taskInfo := strings.TrimSpace(wh.Message.Text[wh.Message.Entities[0].Length:]) if taskInfo != "" { for _, integrationData := range chat.Integrations { id, info := integration.New(integrationData, h.App.Log()).GetTaskInfo(taskInfo)