set as HTML mode
This commit is contained in:
parent
f72631e072
commit
9a0cc9c1c3
|
|
@ -17,6 +17,7 @@ type (
|
||||||
// TelegramPayload represents
|
// TelegramPayload represents
|
||||||
TelegramPayload struct {
|
TelegramPayload struct {
|
||||||
Message string `json:"text"`
|
Message string `json:"text"`
|
||||||
|
ParseMode string `json:"parse_mode"`
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -25,6 +26,7 @@ func (p *TelegramPayload) SetSecret(_ string) {}
|
||||||
|
|
||||||
// JSONPayload Marshals the TelegramPayload to json
|
// JSONPayload Marshals the TelegramPayload to json
|
||||||
func (p *TelegramPayload) JSONPayload() ([]byte, error) {
|
func (p *TelegramPayload) JSONPayload() ([]byte, error) {
|
||||||
|
p.ParseMode = "HTML"
|
||||||
data, err := json.MarshalIndent(p, "", " ")
|
data, err := json.MarshalIndent(p, "", " ")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return []byte{}, err
|
return []byte{}, err
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user