mirror of
https://github.com/hrfee/jfa-go.git
synced 2025-01-06 08:20:11 +00:00
Compare commits
3 Commits
23800bb892
...
478b40d0ff
Author | SHA1 | Date | |
---|---|---|---|
478b40d0ff | |||
8b816dc725 | |||
81a58f628b |
@ -50,7 +50,7 @@ builds:
|
|||||||
flags:
|
flags:
|
||||||
- -tags=tray
|
- -tags=tray
|
||||||
ldflags:
|
ldflags:
|
||||||
- -s -w -X main.version={{.Env.JFA_GO_VERSION}} -X main.commit={{.ShortCommit}} -X main.updater=binary
|
- -s -w -X main.version={{.Env.JFA_GO_VERSION}} -X main.commit={{.ShortCommit}} -X main.updater=binary -H=windowsgui
|
||||||
goos:
|
goos:
|
||||||
- windows
|
- windows
|
||||||
goarch:
|
goarch:
|
||||||
|
@ -148,7 +148,10 @@ func (t *TelegramDaemon) Send(message *Message, ID ...int64) error {
|
|||||||
if message.Markdown == "" {
|
if message.Markdown == "" {
|
||||||
msg = tg.NewMessage(id, message.Text)
|
msg = tg.NewMessage(id, message.Text)
|
||||||
} else {
|
} else {
|
||||||
msg = tg.NewMessage(id, strings.ReplaceAll(message.Markdown, ".", "\\."))
|
text := strings.ReplaceAll(message.Markdown, ".", "\\.")
|
||||||
|
text = strings.ReplaceAll(text, "![", "[")
|
||||||
|
text = strings.ReplaceAll(text, "!", "\\!")
|
||||||
|
msg = tg.NewMessage(id, text)
|
||||||
msg.ParseMode = "MarkdownV2"
|
msg.ParseMode = "MarkdownV2"
|
||||||
}
|
}
|
||||||
_, err := t.bot.Send(msg)
|
_, err := t.bot.Send(msg)
|
||||||
|
Loading…
Reference in New Issue
Block a user