Skip to content

Commit

Permalink
Merge pull request #17 from lidofinance/telegram-markdown
Browse files Browse the repository at this point in the history
feat: add telegram markdown support
  • Loading branch information
sergeyWh1te authored Sep 9, 2024
2 parents 9d0c1d7 + 164433d commit 6f047e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/pkg/notifiler/telegram.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func (u *telegram) SendAlert(ctx context.Context, alert *models.Alert) error {
}

func (u *telegram) send(ctx context.Context, message string) error {
requestURL := fmt.Sprintf("https://api.telegram.org/bot%s/sendMessage?chat_id=-%s&text=%s", u.botToken, u.chatID, url.QueryEscape(message))
requestURL := fmt.Sprintf("https://api.telegram.org/bot%s/sendMessage?chat_id=-%s&text=%s&parse_mode=markdown", u.botToken, u.chatID, url.QueryEscape(message))
req, err := http.NewRequestWithContext(ctx, http.MethodGet, requestURL, http.NoBody)
if err != nil {
return fmt.Errorf("could not create telegram request: %w", err)
Expand Down

0 comments on commit 6f047e8

Please sign in to comment.