vote for the task via reply
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Pavel 2024-05-23 15:30:10 +03:00
parent 9a020253de
commit 1e6022df08

View File

@ -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)