Skip to content

Commit

Permalink
feat(subscribe): format message
Browse files Browse the repository at this point in the history
  • Loading branch information
indes committed Jan 15, 2019
1 parent f3ac0bf commit b89db17
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bot/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ func registFeed(chat *telebot.Chat, url string) {
log.Printf("%d subscribe [%d]%s %s", chat.ID, source.ID, source.Title, source.Link)

if err == nil {
msg, _ = B.Edit(msg, fmt.Sprintf("<%s> 订阅成功", source.Title))
msg, _ = B.Edit(msg, fmt.Sprintf(" [%s](%s) 订阅成功", source.Title, source.Link),
&telebot.SendOptions{
DisableWebPagePreview: true,
ParseMode: telebot.ModeMarkdown,
})
} else {
msg, _ = B.Edit(msg, "订阅失败")
}
Expand Down

0 comments on commit b89db17

Please sign in to comment.