mirror of
https://github.com/semaphoreui/semaphore.git
synced 2024-11-23 20:35:24 +01:00
fix(be): bug with alert chat id https://github.com/ansible-semaphore/semaphore/issues/853
This commit is contained in:
parent
5185fa4067
commit
95e891cdd8
@ -10,5 +10,5 @@ type Project struct {
|
||||
Name string `db:"name" json:"name" binding:"required"`
|
||||
Created time.Time `db:"created" json:"created"`
|
||||
Alert bool `db:"alert" json:"alert"`
|
||||
AlertChat string `db:"alert_chat" json:"alert_chat"`
|
||||
AlertChat *string `db:"alert_chat" json:"alert_chat"`
|
||||
}
|
||||
|
@ -72,8 +72,8 @@ func (t *TaskRunner) sendTelegramAlert() {
|
||||
}
|
||||
|
||||
chatID := util.Config.TelegramChat
|
||||
if t.alertChat != "" {
|
||||
chatID = t.alertChat
|
||||
if t.alertChat != nil && *t.alertChat != "" {
|
||||
chatID = *t.alertChat
|
||||
}
|
||||
|
||||
var telegramBuffer bytes.Buffer
|
||||
|
@ -31,7 +31,7 @@ type TaskRunner struct {
|
||||
|
||||
users []int
|
||||
hosts []string
|
||||
alertChat string
|
||||
alertChat *string
|
||||
alert bool
|
||||
prepared bool
|
||||
process *os.Process
|
||||
|
Loading…
Reference in New Issue
Block a user