mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-09-07 21:54:59 +08:00
Add MarkdownV2 parse_mode
This commit is contained in:
parent
739ed0990a
commit
9f43f6db32
1 changed files with 2 additions and 0 deletions
|
@ -33,11 +33,13 @@ func (s *telegramNotifier) Notify(domain, provider, msg string, err error, previ
|
|||
var payload struct {
|
||||
ChatID int64 `json:"chat_id"`
|
||||
Text string `json:"text"`
|
||||
ParseMode string `json:"parse_mode"`
|
||||
}
|
||||
|
||||
url := fmt.Sprintf("https://api.telegram.org/bot%s/sendMessage", s.BotToken)
|
||||
|
||||
payload.ChatID, _ = strconv.ParseInt(s.ChatID, 10, 64)
|
||||
payload.ParseMode = "MarkdownV2"
|
||||
|
||||
if preview {
|
||||
payload.Text = fmt.Sprintf(`DNSControl preview: %s[%s]:\n%s`, domain, provider, msg)
|
||||
|
|
Loading…
Add table
Reference in a new issue