PrometheusAlert icon indicating copy to clipboard operation
PrometheusAlert copied to clipboard

tg 源码里面可以加上msg.ParseMode = ModeMarkdown?

Open liuwenzhi0318 opened this issue 2 years ago • 2 comments

image

我看代码中生成NewMessage,没有把 ParseMode 给指定,可以把这个里的这个值加到app.conf, 因为我不是很懂 go,只能大概看出是这里的原因

liuwenzhi0318 avatar May 25 '23 10:05 liuwenzhi0318

@zhangsean @cfxks1989 也就是在这一行的下面加上这个,并且通过外部变量进行引用 https://github.com/feiyu563/PrometheusAlert/blob/357d547cea7b83beab07c3ef8a220cd5d7c88371/controllers/telegram.go#L29 和 https://github.com/feiyu563/PrometheusAlert/blob/357d547cea7b83beab07c3ef8a220cd5d7c88371/controllers/telegram.go#L33

##配置参考原有 tgParseMode := beego.AppConfig.String("TG_ParseMode")

liuwenzhi0318 avatar May 25 '23 10:05 liuwenzhi0318