1
0
mirror of https://github.com/hrfee/jfa-go.git synced 2024-10-18 17:10:11 +00:00

Compare commits

..

No commits in common. "478b40d0ff7122d79df54b25a3118cfd4640f6e5" and "23800bb8928a39a568990b4a8dec42dbf240188b" have entirely different histories.

2 changed files with 2 additions and 5 deletions

View File

@ -50,7 +50,7 @@ builds:
flags:
- -tags=tray
ldflags:
- -s -w -X main.version={{.Env.JFA_GO_VERSION}} -X main.commit={{.ShortCommit}} -X main.updater=binary -H=windowsgui
- -s -w -X main.version={{.Env.JFA_GO_VERSION}} -X main.commit={{.ShortCommit}} -X main.updater=binary
goos:
- windows
goarch:

View File

@ -148,10 +148,7 @@ func (t *TelegramDaemon) Send(message *Message, ID ...int64) error {
if message.Markdown == "" {
msg = tg.NewMessage(id, message.Text)
} else {
text := strings.ReplaceAll(message.Markdown, ".", "\\.")
text = strings.ReplaceAll(text, "![", "[")
text = strings.ReplaceAll(text, "!", "\\!")
msg = tg.NewMessage(id, text)
msg = tg.NewMessage(id, strings.ReplaceAll(message.Markdown, ".", "\\."))
msg.ParseMode = "MarkdownV2"
}
_, err := t.bot.Send(msg)