feat: add to field to specify the receiver (close #48)

This commit is contained in:
JustSong
2023-04-16 09:55:23 +08:00
parent 69f503124a
commit 3d38260e5b
10 changed files with 55 additions and 3 deletions
+1
View File
@@ -21,6 +21,7 @@ type telegramMessageResponse struct {
}
func SendTelegramMessage(message *model.Message, user *model.User) error {
// https://core.telegram.org/bots/api#sendmessage
if user.TelegramBotToken == "" || user.TelegramChatId == "" {
return errors.New("未配置 Telegram 机器人消息推送方式")
}